#include <bits/stdc++.h>
using namespace std;
void setup() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin.tie(NULL);
  cout.precision(9);
}
bool comp(const pair<int, int> &a, const pair<int, int> &b) {
  if (a.first == b.first) {
    return a.second > b.second;
  }
  return a.first < b.first;
}
map<int, int> m;
map<int, int> x;
int main() {
  setup();
  int n;
  cin >> n;
  int a[n + 2];
  int b[n + 2], j = -1;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    m[a[i]] += 1;
  }
  for (int i = 1; i <= n; ++i) {
    if (m.find(i) == m.end()) {
      b[++j] = i;
    }
  }
  j = 0;
  for (int i = 0; i < n; ++i) {
    if (x.find(a[i]) != x.end() || a[i] > n) {
      if (m[a[i]] == 0) {
        x.erase(a[i]);
      }
      a[i] = b[j];
      ++j;
      m[a[i]] -= 1;
      continue;
    }
    if (x.find(a[i]) == x.end()) {
      x[a[i]] += 1;
      m[a[i]] -= 1;
    }
  }
  for (int i = 0; i < n; ++i) cout << a[i] << " ";
  return 0;
}
