#include <bits/stdc++.h>
using namespace std;
int n;
int a[1000100];
int vis[1000100];
int anw[1000100];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    if (!vis[a[i]] && a[i] <= n) {
      vis[a[i]] = 1;
      anw[i] = a[i];
    }
  }
  int cnt = 1;
  for (int i = 1; i <= n; i++) {
    if (anw[i] == 0) {
      while (vis[cnt]) cnt++;
      anw[i] = cnt;
      vis[cnt] = 1;
    }
  }
  for (int i = 1; i <= n; i++) cout << anw[i] << " ";
  return 0;
}
