#include <bits/stdc++.h>
using namespace std;
int a[100005];
bool vis[100005];
int main() {
  memset(vis, false, sizeof vis);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (vis[a[i]] || a[i] > n)
      a[i] = 0;
    else
      vis[a[i]] = true;
  }
  int pos = 1;
  for (int i = 1; i <= n; i++) {
    if (i != 1) cout << ' ';
    if (a[i])
      cout << a[i];
    else {
      while (vis[pos]) pos++;
      cout << pos++;
    }
  }
  cout << endl;
  return 0;
}
