#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, number;
  cin >> n;
  int arr[n + 1];
  bool marcado[n + 1];
  memset(marcado, 0, sizeof marcado);
  for (int i = 1; i <= n; i++) {
    cin >> number;
    if (!marcado[number] && number <= n) {
      marcado[number] = true;
      arr[i] = number;
    } else
      arr[i] = 0;
  }
  int i, j;
  for (i = 1, j = 1; i <= n; i++) {
    if (arr[i] != 0) {
      cout << arr[i] << " ";
    } else {
      while (marcado[j]) j++;
      cout << j++ << " ";
    }
  }
}
