#include <stdio.h>
int main(){
int i,j,n,a[100],x;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
for(i=1;i<n;i++){
if(a[i-1]>a[i]){
j=i-1;
x=a[i];
a[i]=a[i-1];
while(x<a[j]){
a[j+1]=a[j];
j--;
}
a[j+1]=x;
}
}
for(i=0;i<n;i++){
printf("%d ",a[i]);
}
printf("\n");
return 0;
}
int main(){
int i,j,n,a[100],x;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
for(i=1;i<n;i++){
if(a[i-1]>a[i]){
j=i-1;
x=a[i];
a[i]=a[i-1];
while(x<a[j]){
a[j+1]=a[j];
j--;
}
a[j+1]=x;
}
}
for(i=0;i<n;i++){
printf("%d ",a[i]);
}
printf("\n");
return 0;
}