#include <bits/stdc++.h>
using namespace std;
using namespace std;
vector<int> p(100000);
int arr[100000 + 10], used[100000];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    arr[i] = x;
    used[x]++;
    if (used[x] > 1 || x > n || x < 1) {
      p.push_back(i);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (!used[i]) {
      arr[p.back()] = i, p.pop_back();
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << arr[i] << " ";
  }
}
