#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  int b[100100];
  int c[100100];
  memset(b, 0, sizeof b);
  memset(c, 0, sizeof c);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i]]++;
    if (a[i] > n) c[i] = 1;
  }
  queue<int> q;
  queue<int> p;
  for (int i = 1; i <= n; i++) {
    if (!b[i]) {
      q.push(i);
    }
  }
  for (int i = 0; i < n; i++) {
    if (b[a[i]] > 1 || c[i]) {
      cout << q.front() << " ";
      q.pop();
      b[a[i]]--;
    } else {
      cout << a[i] << " ";
    }
  }
  cout << endl;
}
