import java.util.Scanner;
/**
* HJ35 蛇形矩阵
*/
public class HJ035 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int n = sc.nextInt();
for (int i = 1; i <= n; i++) {
for (int j = 0; j <= n - i; j++) {
int num = (i + j) * (i + j + 1) / 2 - (i - 1);
System.out.print(num);
System.out.print(" ");
}
System.out.println();
}
}
sc.close();
}
}