#include<stdio.h>
void bubble_sort(int n,int A[])
{
int i,j,temp,flag;
for(int i=0;i<n-1;i++)
{
int 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(n,A);
for(int i=0;i<n;i++)
{
printf("%d\n",A[i]);
}
return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4Kdm9pZCBidWJibGVfc29ydChpbnQgbixpbnQgQVtdKQp7CmludCBpLGosdGVtcCxmbGFnOwpmb3IoaW50IGk9MDtpPG4tMTtpKyspCnsKaW50IGZsYWc9MDsKZm9yKGludCBqPTA7ajxuLTEtaTtqKyspCnsKaWYoQVtqXT5BW2orMV0pCnsKdGVtcD1BW2pdOwpBW2pdPUFbaisxXTsKQVtqKzFdPXRlbXA7CmZsYWc9MTsKfQp9CmlmKGZsYWc9PTApCnsKYnJlYWs7Cn0KfQp9CmludCBtYWluKCkKewppbnQgbjsKc2NhbmYoIiVkIiwmbik7CmludCBBW25dOwpmb3IoaW50IGk9MDtpPG47aSsrKQp7CnNjYW5mKCIlZCIsJkFbaV0pOwp9CmJ1YmJsZV9zb3J0KG4sQSk7CmZvcihpbnQgaT0wO2k8bjtpKyspCnsKcHJpbnRmKCIlZFxuIixBW2ldKTsKfQpyZXR1cm4gMDsKfQ==