#include <bits/stdc++.h>
using namespace std;
void sort(int a[], int size) {
  for (int j = 0; j < size; j++) {
    int min = a[j], mink = j;
    for (int k = j; k < size; k++) {
      if (a[k] < min) {
        min = a[k];
        mink = k;
      }
    }
    int temp = a[j];
    a[j] = a[mink];
    a[mink] = temp;
  }
}
signed main() {
  int n, k;
  cin >> n >> k;
  int fru[1001];
  for (int i = 0; i < n; i++) {
    cin >> fru[i];
  }
  const int size = sizeof(fru) / sizeof(int);
  sort(fru, size);
  int ans;
  for (int i = 0; i < size; i++) {
    cout << fru[i] << endl;
  }
}
