#include <bits/stdc++.h>
using namespace std;
int main() {
  ios ::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> index, a(n + 1, 0), b(n + 1, 0);
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (x <= n) {
      if (a[x]) {
        index.push_back(i);
      } else {
        a[x] = 1;
        b[i] = x;
      }
    } else {
      index.push_back(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 0) {
      b[index.back()] = i;
      index.pop_back();
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << b[i] << " ";
  }
}
