#include <bits/stdc++.h>
const int MAXN = 1e5;
int v[MAXN + 1], r[MAXN + 1];
int main() {
  int n, x, k;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &v[i]);
    ++r[v[i]];
  }
  k = 1;
  for (int i = 0; i < n; ++i) {
    if (r[v[i]] == 1 && v[i] <= n) {
      printf("%d ", v[i]);
    } else {
      --r[v[i]];
      while (r[k]) {
        ++k;
      }
      ++r[k];
      printf("%d ", k);
    }
  }
  return 0;
}
