program
funct fact( n : int; ) int
	begin
		if n == 0 then
			return 1;
		else
			return n * fact( n - 1 );
		end
	end
var i : int;
begin
	for i = 0; i < 10; i = i + 1 do
		print( i + " " );
		println( fact( i ) );
	end
end.
