#include <bits/stdc++.h>
const int MOD = 1e9 + 7;
const int MAXN = 1e9 + 1;
const double PI = 3.14159265359;
using namespace std;
int a[100001], z[100001];
bool used[100001], q[100001];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    used[a[i]] = 1;
  }
  int c = 1;
  for (int i = 1; i <= n; ++i) {
    if (!used[i]) {
      z[c++] = i;
    }
    used[i] = 0;
  }
  for (int i = 1; i <= n; ++i) {
    if (!used[a[i]] && a[i] <= n) {
      cout << a[i] << " ";
      used[a[i]] = 1;
    } else {
      cout << z[--c] << " ";
    }
  }
  return 0;
}
