A high-security meeting has been arranged. Tables for the delegates and security personnel have been arranged. A total of ‘N’ rows of tables has been set up. The first row has one table, the second row has two, and so on. To ensure maximum security, the tables on either end of each row have been assigned for security personnel each. If there is only one table in a row, it will be assigned to a security personnel. The tables assigned for security personnel will host exactly one security personnel each. All the other tables will host two guests each.
You are given an integer ‘N’, which denotes the number of rows., You are supposed to print the table pattern indicating the number of guests or security personnel at each table. In other words, print the number of people in each table.
For example, if the number of rows are 4, the table pattern is as follows:
1
11
121
1221
Input Format:
The first line contains ‘T’, denoting the number of test cases.
Each test case contains a single integer ‘N’, denoting the number of rows.
Output Format:
For each test case, print 'N' strings denoting the pattern.
Note:
You are not required to print the expected output. It has already been taken care of. Just implement the function.
Constraints:
1 <= T <= 10
1 <= N <= 10^3
Where ‘N’ is the number of lines.
Time Limit: 1 sec