#include<stdio.h>
int a[50];
int partition(int low,int high){
int mid=a[low];while(low<high){while(low<high&&a[high]>=mid)--high;
a[low]=a[high];while(low<high&&a[low]<=mid)++low;
a[high]=a[low];}
a[low]=mid;return low;}voidQuickSort(int low,int high){if(low<high){
int mid=partition(low,high);QuickSort(low,mid-1);QuickSort(mid+1,high);}}
int main(){
int num;scanf("%d",&num);for(int i=0;i<num;i++){scanf("%d",&a[i]);}
int low=0;
int high=--num;QuickSort(low,high);++num;for(int i=0;i<num;i++)printf("%d ",a[i]);return0;}