These kinds of problems are fun in Befunge because you can just copy the input into your program and it becomes a part of your source code.