program ideone;
Const smax = 100;
Type simple = array[0..smax] of smallint;
Var arr:simple; i, j, k, n:shortint; isChange:boolean;
procedure writeArr(Var tArr:simple);
begin
for i:= 0 to n do write(tArr[i], ' ');
writeln();
end;
procedure swap(Var a, b:smallint);
Var temp:smallint;
begin
temp:=a;
a:=b;
b:=temp;
end;
procedure bubbleSort(Var tArr:simple);
begin
isChange:=True;
k:=0;
while isChange = True do
begin
isChange:=False;
for j:=0 to n-k-1 do
if tArr[j] > tArr[j+1] then begin
swap(tArr[j], tArr[j+1]);
isChange:=True;
end;
k:=k+1;
end;
end;
begin
read(n);
n:=n-1;
for i:=0 to n do read(arr[i]);
bubbleSort(arr);
writeln();
writeArr(arr);
end.
cHJvZ3JhbSBpZGVvbmU7CgpDb25zdCBzbWF4ID0gMTAwOwpUeXBlIHNpbXBsZSA9IGFycmF5WzAuLnNtYXhdIG9mIHNtYWxsaW50OwpWYXIgYXJyOnNpbXBsZTsgaSwgaiwgaywgbjpzaG9ydGludDsgaXNDaGFuZ2U6Ym9vbGVhbjsgCgpwcm9jZWR1cmUgd3JpdGVBcnIoVmFyIHRBcnI6c2ltcGxlKTsKYmVnaW4KCWZvciBpOj0gMCB0byBuIGRvIHdyaXRlKHRBcnJbaV0sICcgJyk7Cgl3cml0ZWxuKCk7CmVuZDsKCnByb2NlZHVyZSBzd2FwKFZhciBhLCBiOnNtYWxsaW50KTsKVmFyIHRlbXA6c21hbGxpbnQ7CmJlZ2luCgl0ZW1wOj1hOwoJYTo9YjsKCWI6PXRlbXA7CmVuZDsKCnByb2NlZHVyZSBidWJibGVTb3J0KFZhciB0QXJyOnNpbXBsZSk7CmJlZ2luCglpc0NoYW5nZTo9VHJ1ZTsKCWs6PTA7Cgl3aGlsZSBpc0NoYW5nZSA9IFRydWUgZG8KCWJlZ2luCgkJaXNDaGFuZ2U6PUZhbHNlOwoJCWZvciBqOj0wIHRvIG4tay0xIGRvCgkJCWlmIHRBcnJbal0gPiB0QXJyW2orMV0gdGhlbiBiZ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