Following the account of Jules Verne, a scrambled message written by the medieval alchemist Arne Saknussemm, and deciphered by Professor Lidenbrock, started the incredible journey to the center of the Earth. The scrambling procedure used by Arne is described below.
1. Take a non-empty message that contains letters from the English alphabet, digits, commas, dots, quotes, spaces and line breaks, and whose last character is not a space. For example, consider the following message, whose translation reads "In Sneffels's crater descend brave traveler, and touch the center of the Earth":
In Sneffels craterem descende audasviator, et terrestre centrum attinges.2. Choose an integer and add trailing spaces to so that the length of the resulting message, say M', is the smallest multiple of . For K=19 and the message above, where \textit{length}(M)=74 (including the spaces and the line break in ), two trailing spaces are added, yielding the message M' with \textit{length}(M')=76.
3. Replace all spaces in M' by the character underscore (_); replace all line breaks in M' by backslash (), and then reverse the message. In this case:
__.segnitta_murtnec_ertserret_te_,rotaiv\sadua_ednecsed_meretarc_sleffenS_nI4. Write the reversed message from step 3 into a table with \textit{length}(M')/K rows and columns. Write column-wise. For the given example, the message is written in a table with 76/19=4 rows and columns as follows:
5. The strings of characters corresponding to the rows of the table are the fragments of the scrambled message. The fragments of Arne's message are:
Write a program that deciphers non-empty messages scrambled as described. The length of a message, before scrambling, is at most characters, including spaces and line breaks.
The program input is from a text file where each data set corresponds to a scrambled message. A data set starts with an integer indicating the number of fragments, followed by strings of characters designating the fragments, in the order they appear in the table from step 4. Input data are separated by white-spaces and terminate at the end of file.
The deciphered message must be printed to standard output, starting at the beginning of a line, and must be followed by an empty line as shown in the input/output sample below.
Example 1