By Hamilton José Brumatto, UESC Brazil
Your colleague has a brilliant idea to encode a text, he will use an (almost) complete binary tree with the text distributed in the breadth, and it will present the result of an in order search of the tree. See the example, encoding: "A simple text".
The result we will get on the search will be: "sot mseiUmxp lte". The problem is that although it can easily encode the texts, it can not decode them, and has asked you for an algorithm that receives a coded text and decodes it.
The input contains several test cases, each test case starts with the integer N (0 < N < 200), indicating the amount of characters in the text (only characters of the printable ASCII pattern), in the next line there will be a text with N characters. The test cases end with N = 0.
For each test case, in a single line, print the decoded text on the output.
|Input Sample||Output Sample|
Um texto simples