#include <bits/stdc++.h>
using namespace ::std;
int x[100005];
int b[100005];
int xb[100005];
int main(int argc, const char* argv[]) {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    xb[i] = ++b[x[i]];
  }
  int maxJ = 1;
  int maxx = 1;
  for (int i = 0; i < n; i++) {
    if (xb[i] > 1) {
      int j;
      for (j = maxJ; (j < 100000 + 2) && (b[j] != 0); j++) {
      };
      maxJ = j + 1;
      x[i] = j;
      xb[i] = 1;
      b[j] = 1;
    }
    maxx = max(x[i], maxx);
  }
  for (int i = 1; i < maxx; i++) {
    if (!b[i]) {
      int maxxx = i;
      int maxjj = -1;
      for (int j = 0; (j < n); j++) {
        if (maxxx < x[j]) {
          maxxx = x[j];
          maxjj = j;
        }
      }
      if (maxjj < 0) {
        break;
      } else {
        x[maxjj] = i;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << x[i] << " ";
  }
  return 0;
}
