#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  bool ma[100009] = {0};
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (ma[arr[i]] == 1)
      arr[i] = 0;
    else if (arr[i] >= 1 && arr[i] <= n)
      ma[arr[i]] = 1;
    else {
      arr[i] = 0;
    }
  }
  int index = 0;
  for (int i = 1; i <= n; i++) {
    if (ma[i] == 0) {
      for (int j = index; j < n; j++) {
        index = j;
        if (arr[j] == 0) {
          arr[j] = i;
          break;
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
}
