#include <bits/stdc++.h>
using namespace std;
const int MN = 100111;
int n, a[MN], b[MN];
int main() {
  ios ::sync_with_stdio(false);
  while (cin >> n) {
    for (int i = (1), _b = (n); i <= _b; i++) cin >> a[i];
    set<int> appear;
    for (int i = (1), _b = (n); i <= _b; i++) {
      if (a[i] >= 1 && a[i] <= n && !appear.count(a[i])) {
        appear.insert(a[i]);
        b[i] = a[i];
      } else
        b[i] = 0;
    }
    set<int> available;
    for (int i = (1), _b = (n); i <= _b; i++)
      if (!appear.count(i)) available.insert(i);
    for (int i = (1), _b = (n); i <= _b; i++)
      if (!b[i]) {
        b[i] = *available.begin();
        available.erase(b[i]);
      }
    for (int i = (1), _b = (n); i <= _b; i++) printf("%d ", b[i]);
    puts("");
  }
}
