#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const int dx[9] = {0, 1, -1, 0, 0, -1, -1, 1, 1};
const int dy[9] = {0, 0, 0, -1, 1, -1, 1, -1, 1};
const double pi = acos(-1.0);
int n;
int a[MAXN];
map<int, int> dic;
vector<int> g;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    dic[a[i]]++;
  }
  for (int i = 1; i <= n; i++)
    if (dic[i] == 0) g.push_back(i);
  int len = g.size();
  len--;
  for (int i = 1; i <= n; i++) {
    int temp = dic[a[i]];
    if (a[i] > n) {
      a[i] = g[len];
      len--;
    } else if (temp > 1) {
      dic[a[i]]--;
      a[i] = g[len];
      len--;
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d", a[i]);
    if (i == n)
      puts("");
    else
      printf(" ");
  }
  return 0;
}
