package codingBlocks_Pattern;
import java.util.Scanner;
public class Ques_thirty3 {
private static Scanner sc;
public static void main(String[] args) {
sc = new Scanner(System.in);
int n = sc.nextInt();
int row = 1;
int str = 1;
int spc = n-1;
int str4 =1;
while(row <= n) {
int val = n-1;
int val2 = n-row;
int st =1;
while(st<=spc){
System.out.print("\t");
st++;
}
int strr = 1;
while(strr<=str) {
System.out.print(val2+"\t");
val2++;
strr++;
}
System.out.print("0"+"\t");
int str2 = 1;
while(str2<=str4) {
System.out.print(val+"\t");
str2++;
val--;
}
System.out.println();
row++;
str++;
spc--;
str4++;
}
}
}