import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int a = scanner.nextInt();
            for (int i = 0; i < a; i++) {
                for (int j = 0; j < a - i; j++) {
                    System.out.print((1 + i) * i / 2 + 1 + (i * 2 + j + 3) * j / 2 + " ");
                }
                System.out.println();
            }
        }
    }
}