#include <bits/stdc++.h>
using namespace std;
map<int, int> more;
map<int, int>::iterator it;
int n, num, ct, tp[100010], arr[100010], ls[100010];
int main(void) {
  scanf("%d", &n);
  more.clear();
  for (int i = 0; i < n; i++) {
    scanf("%d", &tp[i]);
    arr[tp[i]]++;
    if (arr[tp[i]] > 1) more[tp[i]]++;
  }
  for (int i = 1; i <= n; i++)
    if (!arr[i]) ls[ct++] = i;
  ct = 0;
  for (int i = 0; i < n; i++) {
    it = more.find(tp[i]);
    if (it == more.end() && tp[i] <= n) continue;
    if (tp[i] > n) {
      tp[i] = ls[ct++];
    } else {
      tp[i] = ls[ct++];
      more[it->first] = it->second - 1;
      if (it->second == 0) more.erase(it);
    }
  }
  for (int i = 0; i < n - 1; i++) printf("%d ", tp[i]);
  printf("%d", tp[n - 1]);
  return 0;
}
