#include<bits/stdc++.h>
using namespace std;
ifstream f("schi.in");
ofstream g("schi.out");
int x,n,y,aib[30005],v[30005],q,t,poz,suma,poz1,rez[30005],i,j;
int ub(int x)
{
return (x&(-x));
}
void add(int x, int y)
{
for(i=x;i<=n;i+=ub(i))
{
aib[i]+=y;
}
}
int sum(int x)
{
int s=0;
for(i=x;i>=1;i-=ub(i))
{
s+=aib[i];
}
return s;
}
int main()
{
f>>n;
for(j=1;j<=n;j++)
f>>v[j];
for(j=n;j>=1;j--)
{
poz1=0;
poz=v[j];
while(sum(poz)-sum(poz1)>0)
{
t=sum(poz)-sum(poz1);
poz1=poz;
poz+=t;
}
add(poz,1);
rez[poz]=j;
}
for(j=1;j<=n;j++)
g<<rez[j]<<'\n';
f.close();
g.close();
return 0;
}