#include <bits/stdc++.h>
using namespace std;
template <class T>
string toStr(const T &x) {
  stringstream s;
  s << x;
  return s.str();
}
template <class T>
int toInt(const T &x) {
  stringstream s;
  s << x;
  int r;
  s >> r;
  return r;
}
int items[100001];
int counti[100001];
int main() {
  int t;
  cin >> t;
  vector<int> perm;
  vector<int> missing;
  for (int i = 1; i <= t; ++i) {
    items[i] = 0;
    counti[i] = 0;
  }
  for (int i = 1; i <= t; ++i) {
    int n;
    cin >> n;
    items[n]++;
    perm.push_back(n);
  }
  for (int i = 1; i <= t; ++i)
    if (items[i] == 0) missing.push_back(i);
  int x = 0;
  for (int i = 0; i < t; ++i) {
    counti[perm[i]]++;
    if (counti[perm[i]] != 1 || perm[i] > t) {
      perm[i] = missing[x];
      x++;
    }
  }
  cout << perm[0];
  for (int i = 1; i < t; ++i) cout << " " << perm[i];
  cout << endl;
  return 0;
}
