#include <bits/stdc++.h>
using namespace std;
bool hash1[100002], hash2[100002];
int a[100002];
int main() {
  ios::sync_with_stdio(false);
  int n, i, j;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    hash1[a[i]] = 1;
  }
  int vis = 1;
  for (i = 1; i <= n; i++) {
    if (hash2[a[i]] == 1 || a[i] > n) {
      for (j = vis; j <= n; j++) {
        if (hash1[j] != 1) {
          cout << j << " ";
          hash1[j] = 1;
          vis = j;
          break;
        }
      }
      hash2[j] = 1;
    } else {
      cout << a[i] << " ";
      hash2[a[i]] = 1;
    }
  }
  cout << endl;
  return 0;
}
