Fill the array n × n with a "snake" (see example).
One integer n (n ≤ 500).
Print the array n × n filled with a "snake".