Problems
Filling
Filling
Fill the array n × n with a "snake" (see example).
Input
One integer n (n ≤ 500).
output
Print the array n × n filled with a "snake".
Input example #1
3
Output example #1
1 2 3 6 5 4 7 8 9