#include <bits/stdc++.h>
using namespace std;
bool have[100001];
int in[100001];
int main() {
  int n;
  vector<int> need;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &in[i]), have[in[i]] = true;
  for (int i = n; i; i--)
    if (!have[i]) need.push_back(i);
  for (int i = 0; i < n; i++) {
    if (have[in[i]] && in[i] <= n) {
      printf("%d ", in[i]);
      have[in[i]] = false;
    } else
      printf("%d ", need.back()), need.pop_back();
  }
  return 0;
}
