eolymp
bolt
Try our new interface for solving problems

Snake

Time limit 1 second
Memory limit 64 MiB

Deduce the square, consisting of NxN cells filled with numbers from 1 to N^2 "snake" (see examples).

Input data

The first line is a single number N (2N100).

Output data

Output N rows of N numbers, separated by a space. Not be permitted beginning snake in the other corner or another of its direction.

Examples

Input example #1
3
Output example #1
1 2 6
3 5 7
4 8 9