#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  map<int, bool> mp, mark;
  vector<int> vec;
  int n, arr[100005], idx = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> arr[i], mp[arr[i]] = true;
  for (int i = 1; i <= n; ++i)
    if (!mp[i]) vec.push_back(i);
  for (int i = 0; i < n; ++i) {
    if ((mark[arr[i]] && mp[arr[i]]) || arr[i] > n)
      arr[i] = vec[idx++];
    else
      mark[arr[i]] = true, mp[arr[i]] = true;
  }
  for (int i = 0; i < n; ++i) cout << arr[i] << " ";
  cout << "\n";
  cin.clear();
  cin.ignore();
  cin.get();
  return 0;
}
