import java.util.Scanner;

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