For a given number N. Print the pattern in the following form: 1 121 12321 1234321 for N=4.
First line of input contains the test cases T. Each line of test case contain the value of N for which the pattern is to be displayed.
For each value of N, print the pattern in a single line.
1 <= T <= 10
1 <= N <= 20
1 121 12321
1 121 12321 1234321 123454321 12345654321
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.