#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n;
  int aa[n], ar[n], m = 0;
  memset(ar, 0, sizeof(ar));
  for (int i = 0; i < n; i++) {
    cin >> a;
    aa[i] = a;
    m = max(m, a);
  }
  int ab[max(m + 2, n + 1)];
  memset(ab, 0, sizeof(ab));
  for (int i = 0; i < n; i++) ab[aa[i]]++;
  for (int i = 0; i < n; i++) {
    if (ab[aa[i]] > 0 && aa[i] <= n) {
      ar[i] = aa[i];
      ab[aa[i]] = -ab[aa[i]];
    }
  }
  int j = 1;
  for (int i = 0; i < n; i++) {
    if (!ar[i]) {
      for (; j < (int)sizeof(ab); j++) {
        if (!ab[j]) {
          ar[i] = j;
          ab[j] = -1;
          break;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) cout << ar[i] << " ";
  cout << endl;
}
