Time limit
2s
Memory limit
128 MB
Two people encrypt messages so that others cannot read them. The original string is first written into a table with K columns. Starting from the leftmost column, fill each column from top to bottom; after a column is full, move to the next column on the right.
If the original string is abcdefghijkl and K = 3, the table is filled as follows.
| a | e | i |
| b | f | j |
| c | g | k |
| d | h | l |
Then the encrypted string is made by reading the table row by row. Read the first row from left to right, the second row from right to left, and continue alternating directions for the remaining rows. The table above produces the encrypted string aeijfbcgklhd.
Given the encrypted string and the number of columns K, restore the original string.
The first line contains the number of columns K. (1 ≤ K ≤ 20)
The second line contains the encrypted string. It consists only of lowercase English letters, its length is at most 200, and its length is a multiple of K.
Print the original string on one line.