const n=10;
var i,j,x:integer;
a:array [1..n] of integer;
begin
for i:=1 to n do
begin
a[i]:=random (90)+10;
write(a[i],' ')
end;
for j:=n-1 downto 1 do
for i:=1 to j do
if a[i]>a[i+1] then
begin
x:=a[i];
a[i]:=a[i+1];
a[i+1]:=x
end;
writeln;
for i:=1 to n do write(a[i],' ')
end.