#include <bits/stdc++.h>
using namespace std;
int a[100100], b[100100], c[100100];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (b[a[i]] == 0 && a[i] <= n) {
      b[a[i]]++;
    } else {
      c[i]++;
    }
  }
  int hh = 1;
  for (int i = 1; i <= n; i++) {
    if (c[i] == 1) {
      while (b[hh] != 0) hh++;
      a[i] = hh;
      b[hh]++;
    }
  }
  for (int i = 1; i <= n; i++) cout << a[i] << " ";
  cout << endl;
  return 0;
}
