Bypass matrix with "snake"#488

Bypass matrix with "snake"

1 second
128 megabytes
Very easy

For a given number , fill the square matrix of size n \times n with integers from to n^2 as follows:

Input

One integer (1 \leq n \leq 100).

Output

Print the filled matrix in the form of rows by integers each.

Examples

Example 1

Loading
Loading