#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  int n, a;
  cin >> n;
  set<int> s;
  for (int i = 1; i <= n; i++) s.insert(i);
  vector<int> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    if (v[i] > n || v[i] < 1)
      v[i] = -1;
    else if (s.find(v[i]) == s.end())
      v[i] = -1;
    else
      s.erase(v[i]);
  }
  for (int i = 0; i < n; i++) {
    if (v[i] == -1) {
      set<int>::iterator it = s.begin();
      v[i] = *it;
      s.erase(v[i]);
    }
  }
  for (int i = 0; i < n; i++) cout << v[i] << " ";
}
