#include <bits/stdc++.h>
using namespace std;
long long int nCr1[1001][1001];
long long int nCr(long long int n, long long int r) {
  if (nCr1[n][r]) return nCr1[n][r];
  if (r == 1) return nCr1[n][r] = n;
  if (n == r) return nCr1[n][r] = 1;
  if (r == 0) return nCr1[n][r] = 1;
  return nCr1[n][r] = (nCr(n - 1, r) + nCr(n - 1, r - 1)) % 1000003;
}
bool prime(long long int n) {
  long long int i;
  for (i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
long long int mul(long long int n) {
  long long int r, s = 1;
  while (n > 0) {
    r = n % 10;
    s = s * r;
    n = n / 10;
  }
  return s;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i;
  cin >> n;
  long long int a[n], j = 0;
  map<long long int, long long int> m;
  vector<long long int> v;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    m[a[i]]++;
  }
  for (i = 1; i <= n; i++) {
    if (m[i] == 0) v.push_back(i);
  }
  for (i = 0; i < n; i++) {
    if (m[a[i]] != 1 || a[i] > n) {
      cout << v[j] << " ";
      m[a[i]]--;
      j++;
    } else
      cout << a[i] << " ";
  }
}
