uses crt;
var a:array[1..100]of integer;
i,n,tam,j:integer;
{---------------chuong-trinh-con----------------------}
procedure hoandoi(x,y:integer);
var tam:integer;
begin
tam:=x;
x:=y;
y:=tam;
end;
{--------------------chuong-trinh-chinh---------------------------}
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n-1 do
for j:=i+1 to n do
if a[i]>a[j] then
begin
hoandoi(a[i],a[j]);
end;
for i:=1 to n do
write(a[i]:4);
readln;
end.