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