#include <bits/stdc++.h>
int selectionSort(int *a, int n) {
  int i, j, minj, v, cnt;
  for (i = 0; i < n; i++) {
    minj = i;
    for (j = i; j < n; j++) {
      if (a[j] < a[minj]) {
        minj = j;
      }
    }
    v = a[i];
    a[i] = a[minj];
    a[minj] = v;
    cnt++;
  }
  return cnt;
}
int main(int argc, const char *argv[]) {
  int N = 100, n, i;
  int a[N], cnt;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  cnt = selectionSort(a, n);
  for (i = 0; i < n; i++) {
    printf("%d", a[i]);
    if (i < n - 1) {
      printf(" ");
    }
  }
  return 0;
}
