

Input: 'N' = 2, ‘MAT’ = [[1, 2], [5, 6]]
Output: 1 2 6 5
So the first row will be printed as it is and the second row will be printed in reverse order.
The first line will contain the integer 'T', denoting the number of test cases.
For each test case, the first line will contain a single integer 'N', the size of the matrix ‘Mat’, and then the next ‘N’ lines will contain ‘N’ integers representing the matrix elements.
For each test case, print the matrix in a specified manner on a new line.
You don't need to print anything. It has already been taken care of. Just implement the given function.
1 <= 'T' <= 10
1 <= 'N' <= 10^3
1 <= ‘MAT[i]’ <= 10^9
Time Limit: 1 sec
For each row, if the row is oddly indexed(0-indexed) then print it in reverse order or you can reverse the row, and then you can print it.