#include<stdio.h>
void bubble_sort(int A[],int n)
{
int i,j,temp,flag;
for(int i=0;i<n-1;i++)
{
flag=0;
for(int j=0;j<n-1-i;j++)
{
if(A[j]>A[j+1])
{
temp=A[j];
A[j]=A[j+1];
A[j+1]=temp;
flag=1;
}
}
if(flag==0)
{
break;
}
}
}
int main()
{
int n;
scanf("%d",&n);
int A[n];
for(int i=0;i<n;i++)
{
scanf("%d",&A[i]);
}
bubble_sort(A,n);
for(int i=0;i<n;i++)
{
printf("%d\n",A[i]);
}
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4Kdm9pZCBidWJibGVfc29ydChpbnQgQVtdLGludCBuKQp7CmludCBpLGosdGVtcCxmbGFnOwpmb3IoaW50IGk9MDtpPG4tMTtpKyspCnsKZmxhZz0wOwpmb3IoaW50IGo9MDtqPG4tMS1pO2orKykKewppZihBW2pdPkFbaisxXSkKewp0ZW1wPUFbal07CkFbal09QVtqKzFdOwpBW2orMV09dGVtcDsKZmxhZz0xOwp9Cn0KaWYoZmxhZz09MCkKewpicmVhazsKfQp9Cn0KaW50IG1haW4oKQp7CmludCBuOwpzY2FuZigiJWQiLCZuKTsKaW50IEFbbl07CmZvcihpbnQgaT0wO2k8bjtpKyspCnsKc2NhbmYoIiVkIiwmQVtpXSk7Cn0KYnViYmxlX3NvcnQoQSxuKTsKZm9yKGludCBpPTA7aTxuO2krKykKewpwcmludGYoIiVkXG4iLEFbaV0pOwp9CnJldHVybiAwOwp9Cg==