//复习中 退役两年的辣鸡选手重写代码们
#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
const int N = 101;
int a[N];
void quicksort(int left,int right,int a[]);
int main(){
int size;
cin>>size;
for(int i = 1;i <= size;i++){
cin>>a[i];
}
quicksort(1,size,a);
for(int j = 1;j <= size;j++){
printf("%d",a[j]);
}
return 0;
}
void quicksort(int left,int right,int a[]){
if(left >= right){
return;
}
int i,j,ref,tmp; //ref 参考点
i = left;j = right;
ref = a[left];
while (i < j){
while(a[j] >= ref && i<j){
j--;
}
while(a[i] <= ref && i<j){
i++;
}
if(i < j){
tmp = a[i];
a[i] = a[j];
a[j] = tmp; //寻找不合法的点交换
}
} //找下一个ref
a[left] = a[i];
a[i] = ref;
quicksort(left,i - 1,a);
quicksort(i + 1,right,a); //递归调用
}