1. You are given a number n, representing the number of rows and columns of a square matrix. 2. You are given n * n numbers, representing elements of 2d array a. 3. You are required to diagonally traverse the matrix and print the contents. For details check image: <img src="https://s3.amazonaws.com/hr-assets/0/1585249079-9dd064c0d4-traversal.png" alt="diagonal">
Input Format
A number n e11 e12.. e21 e22.. .. n * n number of elements of array a
Output Format
Check Image
Constraints
1 <= n <= 10^2 -10^9 <= e11, e12, .. n * m elements <= 10^9
Example
Input
4 10 11 12 13 20 21 22 23 30 31 32 33 40 50 60 70
Output
40 50 30 20 31 60 70 32 21 10 11 22 33 23 12 13