You receive a
's and b
's where you must "find" each query. A query is found if you can find a substring with a
's and b
's.
Input Specification
On the first line you will find the number of test cases,
For each test case, you will find on the first line
On the next
Output Specification
For each test case, print a sequence which respects the requirement. If you can't find a sequence, print -1
.
Sample Input
Copy
1
7 2
4 2
3 3
Sample Output
Copy
abaabab
Comments