#include using namespace std; int main(){ int n; cin >> n; vector a(n); for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 1; i < 2 * n - 3; i++){ for(int j = 0; j < i - j; j++){ if(i - j >= n || j >= n) continue; if(a[j] > a[i - j]){ swap(a[j], a[i - j]); } } } for(int i = 0; i < n - 1; i++) cout << a[i] << " "; cout << a[n - 1] << "\n"; }