Wężyk

No attempts yetTime limit1sMemory limit128 MB

Problem

Staś's favorite game is called wężyk (a little snake). First he chooses one integer nn, then he starts writing consecutive natural numbers on a sheet of paper. In total he writes nn rows, each containing nn numbers.

In the first row Staś writes the numbers from 11 to nn from left to right. The second row, however, he fills from right to left with the numbers from n+1n + 1 to 2n2n. And so on: odd-numbered rows are filled from left to right, and even-numbered rows from right to left.

Your task is to write a program that plays wężyk automatically.

Input

The first and only line of input contains one natural number nn (1n1001 \le n \le 100).

Output

Print nn rows, each containing nn natural numbers. In total n2n^2 numbers must be printed: all natural numbers from 11 to n2n^2. Within each row the numbers must be separated by single spaces.