public class Yanghui {
public static void main(String [] argv) {
int level = 9;
int[] a = new int[level];
int[] b = new int[level];
for (int i = 0; i < level; i++) {
int[] current;
int[] last;
if (0 == i %2) {
current = a;
last = b;
}
else {
current = b;
last = a;
}
for (int j = 0; j < i + 1; j++) {
if (i == 0 || j == 0 || i == j) {
current[j] = 1;
} else {
current[j] = last[j - 1] + last[j];
}
System.out.print(current[j] + " ");
}
System.out.println();
}
}
}