#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[200000];
vector<int> rem;
int ans[200000], res[200000];
unordered_map<int, vector<int>> m;
int main() {
  int n, in;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> in;
    if (m.find(in) == m.end()) m[in] = *(new vector<int>());
    m[in].push_back(i);
  }
  for (int i = 1; i <= n; i++) {
    if (m.find(i) != m.end()) {
      ans[i] = m[i][m[i].size() - 1];
      m[i].pop_back();
      if (m[i].size() == 0) m.erase(i);
    }
  }
  int k = 1;
  for (auto i : m) {
    for (int j = 0; j < i.second.size(); j++) {
      while (ans[k]) {
        k++;
      }
      ans[k] = i.second[j];
    }
  }
  for (int i = 1; i <= n; i++) res[ans[i]] = i;
  for (int i = 1; i <= n; i++) cout << res[i] << " ";
  cout << endl;
  int ___________________________________;
  cin >> ___________________________________;
  return 0;
}
