#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    a[i] = 0;
    for (int s = 0; s < n - 1; s++) {
      for (int t = s + 1; t < n; t++) {
        if (a[t] > a[s]) {
          int tmp = a[s];
          a[t] = a[s];
          a[s] = tmp;
        }
      }
    }
    cout << a[0] << endl;
  }
  return 0;
}
