#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> vec(N);
  vector<int> veccopy(N);
  for (int i = 0; i < N; i++) {
    cin >> vec[i];
    veccopy[i] = vec[i];
  }
  for (int i = 0; i < N; i++) {
    vec[i] -= vec[i];
    sort(vec.begin(), vec.end());
    reverse(vec.begin(), vec.end());
    cout << vec[0];
    for (int j = 0; j < N; j++) {
      vec[j] = veccopy[j];
    }
  }
}
