#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  vector<int> v, t, r;
  map<int, int> m;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    v.push_back(i);
    int b;
    cin >> b;
    t.push_back(b);
    m[b]++;
  }
  r = t;
  int f = 1;
  sort(t.begin(), t.end());
  if (v == t) {
    for (int i = 0; i < v.size(); i++) cout << r[i] << " ";
  } else if (v.size() == 1)
    cout << "1\n";
  else {
    for (int i = 0; i < r.size(); i++) {
      int g = r[i];
      int x = m[g];
      if (x > 1) {
        m[g]--;
        while (f <= n) {
          x = m[f];
          if (x == 0 && f <= n) {
            r[i] = f;
            m[f]++;
            break;
          }
          f++;
        }
      } else if (x == 1 && r[i] > n) {
        while (f <= n) {
          x = m[f];
          if (x == 0 && f <= n) {
            r[i] = f;
            m[f]++;
            break;
          }
          f++;
        }
      }
    }
    for (int i = 0; i < r.size(); i++) cout << r[i] << " ";
  }
  return 0;
}
