import java.util.Scanner;

public class Section043 {
	public static void main(String[] args) {
		Scanner scanf = new Scanner(System.in);
		int x, m, k, i, j, L;
		x = scanf.nextInt();
		int a[][] = new int[x][x];
		k = 0;
		m = x / 2;
		for (i = 0; i <= x - 1; i++)
		{
			if (i < m)
				L = x - i;
			else
				L = i + 1;
			for (j = 0; j <= L - 1; j++)
			{
				k++;
				a[i][j] = k;
			}
		}
		for (int y = 0; y < x; y++)
		{
			for (int z = 0; z < x; z++)
				System.out.printf("%3d", a[y][z]);
			System.out.printf("\n");
		}
		scanf.close();
	}
}
