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