#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int mxn = 10;
  int a[mxn];
  int p[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12};
  int dif[mxn];
  int out[mxn];
  for (int i = 0; i < N; i++) scanf("%d", &a[i]);
  for (int i = N; i < mxn; i++) a[i] = -i;
  sort(a, a + mxn);
  for (int i = 0; i < mxn; i++) dif[i] = p[i] - a[i];
  int cnt = 0;
  do {
    bool b = false;
    for (int i = 1; i < 50; i++)
      for (int j = 1; j < mxn; j++)
        if (p[j] < p[j - 1]) b = true;
    if (!b)
      for (int i = 0; i < mxn; i++) out[i] = p[i];
  } while (next_permutation(p, p + mxn));
  for (int i = 0; i < mxn; i++)
    if ((out[i] - dif[i]) > 0)
      printf(((i == mxn - 1) ? "%d" : "%d "), out[i] - dif[i]);
  cout << endl;
  return 0;
}
