#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005] = {0};
queue<int> q;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i]]++;
    if (b[a[i]] > 1 || a[i] > n) q.push(i);
  }
  for (int i = 1; i <= n; i++) {
    if (!b[i]) {
      int x = q.front();
      a[x] = i;
      q.pop();
    }
    if (q.empty()) break;
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << endl;
  return 0;
}
