#include <stdio.h>
#include <iostream>
using namespace std;
void putPo(int A[],int n)
{
bool judge = false;
while(!judge){
judge = true;
for(int i = 0;i < (n-1);i++){
if(A[i]>A[i+1]){
swap(A[i],A[i+1]);
judge = false;
}
}
n--;
}
}
int main(){
int n;
int A[1000];
scanf("%d",&n);
for(int i = 0;i<n;i++){
scanf("%d",&A[i]);
}
putPo(A,n);
for(int i = 0;i<n;i++){
printf("%d ",A[i]);
}
return 0;
}