#include <bits/stdc++.h>
int hash[100006];
int main() {
  int n;
  scanf("%d", &n);
  int arr[n + 1];
  for (int i = 0; i < n; i++) {
    int temp;
    scanf("%d", &arr[i]);
    hash[arr[i]]++;
  }
  int cur = 1;
  int i;
  while (cur < n) {
    if (hash[cur] == 0) break;
    cur++;
    if (cur > n) {
      for (i = 0; i < n; i++) printf("%d ", arr[i]);
      return 0;
    }
  }
  for (i = 0; i < n; i++) {
    if (hash[arr[i]] > 1 || arr[i] > n) {
      hash[arr[i]]--;
      arr[i] = cur;
      cur++;
      while (cur <= n) {
        if (hash[cur] == 0) break;
        cur++;
      }
    }
  }
  for (i = 0; i < n; i++) printf("%d ", arr[i]);
  return 0;
}
