import java.util.*;
public class Main {
public static void main(String args[]) {
int nst = 1;
int rows = 1;
int N=5;
while (rows <= N) {
int val = 1;
if (rows != 1) {
val = rows - 1;
}
int cst = 1;
while (cst <= nst) {
if (cst == 1 || cst == nst)
System.out.print(val);
else
System.out.print(0);
cst++;
}
rows++;
System.out.println();
nst++;
}
}
}