#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  ios_base::sync_with_stdio(0);
  cin >> n;
  vector<bool> vis(100001, 0);
  vector<int> v(n, 0);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    vis[v[i]] = 1;
  }
  queue<int> q;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) q.push(i);
    vis[i] = 0;
  }
  for (int i = 0; i < n; i++) {
    if (!vis[v[i]]) {
      vis[v[i]] = 1;
    } else {
      v[i] = q.front();
      q.pop();
    }
  }
  for (int i = 0; i < n; i++) {
    cout << v[i] << " ";
  }
}
