#include <iostream> using namespace std; int a[10]; void quickSort(int left,int right){ int i,j,t,temp; if(left > right) return; temp = a[left]; i = left; j = right; while(i!=j){ while(a[j]>=temp && i<j){ j--; } while(a[i]<=temp && i<j){ i++; } if(i<j){ t = a[i]; a[i] = a[j]; a[j] = t; } } a[left] = a[i]; a[i] = temp; quickSort(left,i-1); quickSort(i+1,right); } int main() { int n; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } quickSort(0,n-1); for(int i=0;i<n;i++){ cout<<a[i]<<endl; } return 0; }