#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 1e5 + 10;
const int minn = 1e6 + 10;
const double PI = acos(-1.0);
int a[maxn], vis[maxn], vis2[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] <= n) vis[a[i]]++;
  }
  int cnt = 1;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      vis2[cnt++] = i;
    }
  }
  int k = 1;
  for (int i = 1; i <= n; i++) {
    if (a[i] > n) {
      a[i] = vis2[k];
      vis[a[i]]++;
      k++;
    } else if (vis[a[i]] > 1) {
      vis[a[i]]--;
      a[i] = vis2[k];
      vis[a[i]]++;
      k++;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i != n)
      cout << a[i] << " ";
    else
      cout << a[i] << endl;
  }
  cout << endl;
  return 0;
}
