using System.Collections.Generic;
using System.Threading.Tasks;
static void Main(string[] args)
var n = int.Parse(Console.ReadLine());
for (int row = 0; row < n; row++)
for (int column = 0; column < n; column++)
count = row + column + 1;
Console.Write(count + " ");
count = (2 * n) - column - row - 1;
Console.Write(count + " ");