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