#include <bits/stdc++.h>
using namespace std;
long long i, j, n, k, k1, k2, k3, m, fldgjdflgjhrthrl, fldggfhfghjdflgjl,
    fldgjdflgrtyrtyjl, ffgfldgjdflgjl, h, x, y;
string s1, s2, s3, s;
long long a[100500], used[100500];
vector<long long> f, g;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < 1 || a[i] > n || used[a[i]] == 1) a[i] = 0;
    if (a[i] >= 1 && a[i] <= n) used[a[i]] = 1;
  }
  for (i = 0; i < n; i++)
    if (a[i] == 0) f.push_back(i);
  for (i = 1; i <= n; i++)
    if (!used[i]) g.push_back(i);
  for (i = 0; i < f.size(); i++) a[f[i]] = g[i];
  for (i = 0; i < n; i++) cout << a[i] << " ";
  return 0;
}
