#P1840A. Cipher Shifer
Cipher Shifer
Description
There is a string (unknown to you), consisting of lowercase Latin letters, encrypted according to the following rule into string :
- after each character of string , an arbitrary (possibly zero) number of any lowercase Latin letters, different from the character itself, is added;
- after each such addition, the character that we supplemented is added.
You are given string , and you need to output the initial string . In other words, you need to decrypt string .
Note that each string encrypted in this way is decrypted uniquely.
The first line of the input contains a single integer () — the number of test cases.
The descriptions of the test cases follow.
The first line of each test case contains a single integer () — the length of the encrypted message.
The second line of each test case contains a string of length — the encrypted message obtained from some string .
For each test case, output the decrypted message on a separate line.
Input
The first line of the input contains a single integer () — the number of test cases.
The descriptions of the test cases follow.
The first line of each test case contains a single integer () — the length of the encrypted message.
The second line of each test case contains a string of length — the encrypted message obtained from some string .
Output
For each test case, output the decrypted message on a separate line.
Note
In the first encrypted message, the letter is encrypted as , and the letter is encrypted as .
In the second encrypted message, only one letter is encrypted as .
In the third encrypted message, zero characters are added to each letter.