program
funct comb( n, r : int; ) int
	begin
		if r < 0 or r > n then
			return 0;
		elif r == 0 or r == n then
			return 1;
		else
			return comb( n - 1, r - 1 ) + comb( n - 1, r );
		end
	end
funct pad( n, padlen : int; ) string
	var s : string;
	var length : int;
	begin
		s = "" + n;
		if n < 0 then
			length = 2;
			n = - n;
		else
			length = 1;
		end
		while n >= 10 do
			length = length + 1;
			n = n / 10;
		end
		while length < padlen do
			s = " " + s;
			length = length + 1;
		end
		return s;
	end
var n, r : int;
begin
	for n = 0; n < 10; n = n + 1 do
		for r = 0; r < 10 - n; r = r + 1 do
			print( "    " );
		end
		for r = 0; r <= n; r = r + 1 do
			print( pad( comb( n, r ), 8 ) );
		end
		println();
	end
end.
