Count-And-Say is a sequence of numbers given below:
This sequence starts with 1.
1 is read as one 1 → 11
11 is read as two 1 → 21
21 is read as one 2, one 1 → 1211
1211 is read as one 1, one 2, two 1 → 111221
And so on…
Given a number n, find the nth sequence.
The first line contains an integer ‘T’ denoting the number of test cases.
For each test case, the input has one line with an integer ‘n’.
For each test case, the output has a line with a string ‘s’ denoting the value of countAndSay(n).
3
2
4
6
11
1211
312211
1 <= T <= 40
1 <= n <= 40