#include <bits/stdc++.h>
using namespace std;
int n, a[100010], b[100010], c[100010], d[100010];
int main() {
  memset(c, 0, sizeof(c));
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    c[a[i]]++;
  }
  int p = 0;
  for (int i = 1; i <= n; i++) {
    if (!c[i]) {
      d[p++] = i;
    }
  }
  int j = 0;
  memset(c, 0, sizeof(c));
  for (int i = 0; i < n; i++) {
    if (a[i] > n || c[a[i]] != 0) {
      b[i] = d[j];
      c[b[i]]++;
      j++;
    } else {
      b[i] = a[i];
      c[b[i]]++;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    printf("%d ", b[i]);
  }
  printf("%d\n", b[n - 1]);
  return 0;
}
