A simple tool is provided to help you test your code offline. To use it, you must write a program which reads its input via standard in and writes its output to standard out. As usual, you may write debugging output to standard error (be careful not to write anything but your output to standard out).

To us this tool, your program should start by reading two integers: N, the number of encoded messages, and M the length of each message. These two number will be given as the first line of input. The following N lines will each contain M characters, and represent the N encoded messages. Once you have read in and processed the messages, you should write your output to standard out, followed by a new line characters. Be sure to flush your output buffers. Thus, you might add a main method to your code which looks something like this:

    N = nextInt();
    M = nextInt();
    in = new String[N];
    for(i = 0; i<N; i++){
        in[i] = nextString();
    }
    println(solution.decrypt(in));
    flush(stdout)
To run this tool, you should download the jar file and decompress the documents to the same directory. Once you have created your program, you can run the tool from the command line:
    java -jar OneTimePad "your process" seed
Here "your process" is the command for your executable, like "java MySolution" (quotes are needed if there is a space in the process), and seed is the seed for the random number generator, (the examples are seeds 1-10).

You may also download the source code for this tool. If you want to use the word list available via the getWords method, you will have to write your own getWords function to read and parse the file (you only need to do this for offline testing, when testing on TopCoder's site, this method is provided for you).