Given asquarematrix mat of size N x N. The task is to rotate it by 90 degrees in anti-clockwise direction without using any extra space.
Input: The first line of input contains a single integer T denoting the number of test cases. ThenT test cases follow. Each test case consist of two lines. The first line of each test case consists of an integer N, where N is the size of the square matrix.The second line of each test case contains N x N space separated values of the matrix mat.
Corresponding to each test case, in a new line, print the rotated array.
1 ≤ T ≤ 50
1 ≤ N ≤ 50
1 <= mat <= 100