#include<bits/stdc++.h>//很像哈希表中找位置的想法
using namespace std;//只要之前出现过,就把他移动到未出现过的位置
const int N = 1e6+1e5+10;//这里不需要在意数值,只需要考虑出没出现过
int p[N];
int find(int x)
{
if(x!=p[x])p[x]=find(p[x]);
return p[x];
}
int main()
{
int n;
scanf("%d", &n);
for(int i=1;i<=N;i++)p[i]=i;
for(int i=1;i<=n;i++)
{
int x;
scanf("%d",&x);
x=find(x);//表示从x往右第一个没有被用过的数(默认是指向自己)
printf("%d ",x);
p[x]=x+1;//表示已经用过了,指向下一位
}
return 0;
}