#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e5 + 5;
int n;
int a[maxn];
bool Free[maxn];
bool f[maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    if (a[i] <= n && !f[a[i]]) {
      f[a[i]] = 1;
      Free[i] = 1;
    }
  }
  int t = 1;
  for (int i = 1; i <= n; ++i)
    if (Free[i]) {
      printf("%d ", a[i]);
    } else {
      while (f[t]) ++t;
      f[t] = 1;
      printf("%d ", t);
    }
}
