#include <bits/stdc++.h>
using namespace std;
int used[100100];
int num_buff[100100];
set<int> unused;
vector<int> queued;
int main() {
  int n, curr;
  memset(used, 0, sizeof(used));
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    unused.insert(i);
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &curr);
    num_buff[i] = curr;
    if (curr <= n && !used[curr]) {
      used[curr] = 1;
      unused.erase(curr);
    } else {
      queued.push_back(i);
    }
  }
  for (int i = 0; i < queued.size(); i++) {
    int assign_val = *unused.begin();
    num_buff[queued[i]] = assign_val;
    unused.erase(assign_val);
  }
  for (int i = 0; i < n; i++) {
    if (i == 0)
      printf("%d", num_buff[i]);
    else
      printf(" %d", num_buff[i]);
  }
  printf("\n");
  return 0;
}
