#include <bits/stdc++.h>
using namespace std;
int n;
int items[100001];
int counts[100001] = {};
int repeats[100001] = {};
int maxn = 0;
int curzero = 1;
void print_items() {
  for (int i = 1; i <= n; ++i) {
    cout << items[i] << " ";
  }
  cout << endl;
}
void print_counts() {
  for (int i = 1; i <= maxn; ++i) {
    cout << counts[i] << " ";
  }
  cout << endl;
}
void find_zero() {
  if (counts[curzero] > 0) {
    for (int i = curzero + 1; i <= max(n, maxn); ++i) {
      if (counts[i] == 0) {
        curzero = i;
        return;
      }
    }
  }
}
void renumber(int idx, int number) {
  find_zero();
  items[idx] = curzero;
  ++counts[curzero];
  --counts[number];
}
int main() {
  cin.sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> items[i];
    maxn = max(maxn, items[i]);
    ++counts[items[i]];
  }
  int cur;
  for (int i = 1; i <= n; ++i) {
    cur = items[i];
    ++repeats[items[i]];
    if (cur > n) {
      renumber(i, cur);
    } else if (repeats[cur] > 1) {
      renumber(i, cur);
    }
  }
  print_items();
  return 0;
}
