#include <bits/stdc++.h>
using namespace std;
int memo[100001] = {0};
int main() {
  int n;
  scanf("%d", &n);
  int temp;
  int lowest_available = 1;
  vector<int> arr;
  for (int i = 0; i < n; i++) {
    scanf("%d", &temp);
    arr.push_back(temp);
    memo[temp]++;
    if (temp == lowest_available) {
      lowest_available++;
    }
  }
  for (int i = 0; i < n; i++) {
    if (memo[arr[i]] > 1 || arr[i] > n) {
      while (memo[lowest_available] != 0) {
        lowest_available++;
      }
      memo[arr[i]]--;
      arr[i] = lowest_available;
      lowest_available++;
      memo[arr[i]]++;
    }
    printf("%d", arr[i]);
    if (i < n - 1)
      printf(" ");
    else {
      printf("\n");
    }
  }
}
