var num,temp,k,loop1,loop2:longint;
a:array[1..1000] of longint;
begin
readln(num);//读入数据个数
for loop1:=1to num do
read(a[loop1]);//读入进行排序的数据
for loop1:=1to num-1 do
begin
k:= loop1;
for loop2:=loop1+1to num do
ifa[k]>a[loop2]then
k:=loop2;//比较得出最小数
ifk<>loop1then//优化节省时间
begin
temp:=a[k];
a[k]:=a[loop1];
a[loop1]:=temp;//进行数据交换
end;
end;
forloop1:=1to num do
write(a[loop1],'');//输出排序后的数据
readln;
readln;
end.