Program rabota_01;
var
a,b,c,d : integer;
Begin
for a:=1 to 4 do
for b:=a+1 to 4 do
for c:=b+1 to 4 do
for d:=c+1 to 4 do
writeln(a:3,b:3,c:3,d:3);
for a:=1 to 4 do
for b:=a+1 to 4 do
for c:=b+1 to 4 do
writeln(a:3,b:3,c:3);
for a:=1 to 4 do
for b:=a+1 to 4 do
writeln(a:3,b:3);
for a:=1 to 4 do
writeln(a:3);
readln;
End.