import java.util.*;
public class Main {
public static void sort(int arr[],int low,int high){
if(low>=high)
return;
int mid=(low+high)/2;
int pivot=arr[mid];
int left=low;
int right=high;
while(left<=right){
while(arr[left]<pivot){
left++;
}
while(arr[right]>pivot){
right–;
}
if(left<=right){
int temp=arr[left];
arr[left]=arr[right];
arr[right]=temp;
}
}
sort(arr,low,right);
sort(arr,left,high);
}
public static void arrays(int arr[],int n){
for(int i=0;i<n;i++){
System.out.print(arr[i]+" ");
}}
public static void main(String args[]) {
try{
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int arr[] =new int[n];
System.out.println();
for(int h=0;h<n;h++)
arr[h]=sc.nextInt();
Main ob = new Main();
ob.sort(arr, 0, n-1);
System.out.println();
arrays(arr,n);
}catch(Exception e){System.out.println(e);}
}
}