#include <bits/stdc++.h>
using namespace std;
int a[1000090];
int vis[1000090];
int main() {
  int n;
  cin >> n;
  queue<int> q;
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    vis[a[i]]++;
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] == 0) {
      q.push(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    if ((vis[a[i]] > 1 && !q.empty()) || a[i] > n && !q.empty()) {
      vis[a[i]] -= 1;
      a[i] = q.front();
      q.pop();
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << a[i] << ' ';
  }
}
