#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  vector<int> a;
  int i;
  int max;
  cin >> n;
  for (i = 0; i < n; i++) {
    int n1;
    cin >> n1;
    a.emplace_back(n1);
  }
  sort(a.begin(), a.end());
  max = a[0];
  for (i = 0; i < n; i++) {
    if (max == a[i]) {
      cout << max << endl;
    } else {
      cout << a[i] << endl;
    }
  }
}
