package challenge;
import java.util.Scanner;
public class c1 {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int val = 1;
int nst = 1;
// row
int row = 1;
while (row <= n) {
if(row<=n/2) {
val=1;
}
else {
val=n-row;
}
// star wrk
for (int cst = 1; cst <= nst; cst++) {
if (cst == 1|| cst == nst) {
System.out.print(val);
} else {
System.out.print("0");
}
}
row = row++;
}
// preparation
System.out.print("\n");
nst = nst + 1;
row = row + 1;
}
}