#P1927B. Following the String
Following the String
No submission language available for this problem.
Description
Polycarp lost the string of length consisting of lowercase Latin letters, but he still has its trace.
The trace of the string is an array of integers, where is the number of such indices () that . For example, the trace of the string abracadabra is the array [].
Given a trace of a string, find any string from which it could have been obtained. The string should consist only of lowercase Latin letters a-z.
The first line of the input contains a single integer () — the number of test cases. Then the descriptions of the test cases follow.
The first line of each test case contains a single integer () — the length of the lost string.
The second line of each test case contains integers () — the trace of the string. It is guaranteed that for the given trace, there exists a suitable string .
It is guaranteed that the sum of over all test cases does not exceed .
For each test case, output a string that corresponds to the given trace. If there are multiple such strings , then output any of them.
The string should consist of lowercase Latin letters a-z.
It is guaranteed that for each test case, a valid answer exists.
Input
The first line of the input contains a single integer () — the number of test cases. Then the descriptions of the test cases follow.
The first line of each test case contains a single integer () — the length of the lost string.
The second line of each test case contains integers () — the trace of the string. It is guaranteed that for the given trace, there exists a suitable string .
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, output a string that corresponds to the given trace. If there are multiple such strings , then output any of them.
The string should consist of lowercase Latin letters a-z.
It is guaranteed that for each test case, a valid answer exists.