Killjee has got a matrix and now he is trying represent it in a ZIg-Zag format.
The zigzag format of a matrix is representation of its diagonals in separate line.
Where, Ith line of output contains ith top right - bottom left diagonal if I is odd.
Ith line of output should contain Ith bottom left - top right diagonal. If I is even.
See sample explanation for better understanding.
INPUT
First line of input contain two space separated integers N and M, where N is number of rows in matrix and M is number of columns in matrix.
OUTPUT
Output Zig-Zag representation of given matrix;
CONSTRAINTS
1≤n,m≤1000
1≤ai≤109
In 1st line we will print 1st top right - bottom left diagonal which is : 1
In 2nd line we will print 2nd bottom left - top right diagonal: 5 2. As, 1st bottom left-top right diagonal is 1
In 3rd line we will print 3rd top right - bottom left diagonal: 3 6 9. As, top right-bottom left diagonal is 2 5