#include <fstream>
using namespace std;

const int NMAX = 30000;

int c_partial[1 + NMAX];
int c_final[1 + NMAX];

int aint[3 * NMAX];

void build(int idx, int st, int dr)
{
  if (st == dr)
  {
      aint[idx] = 1;
    return;
  }

  int mij = (st + dr) / 2;
  int fiu_st = idx * 2;
  int fiu_dr = idx * 2 + 1;

  build(fiu_st, st, mij);
  build(fiu_dr, mij + 1, dr);

  aint[idx] = aint[fiu_st] + aint[fiu_dr];

}

int query(int idx, int st, int dr, int val)
{
  if (st == dr)
  {
    aint[idx]--;
    return st;
  }

  int mij = (st + dr) / 2;
  int fiu_st = idx * 2;
  int fiu_dr = idx * 2 + 1;

  if (val <= aint[fiu_st])
  {
    aint[idx]--;
    return query(fiu_st, st, mij, val);
  }
  else
  {
    aint[idx]--;
    return query(fiu_dr, mij + 1, dr, val - aint[fiu_st]);
  }
}

int main()
{
  ifstream in("schi.in");
  ofstream out("schi.out");

  int n;

  in >> n;
  for (int i = 1; i <= n; i++)
  {
    in >> c_partial[i];
  }

  build(1, 1, n);

  for (int i = n; i >= 1; i--)
  {
    int poz = query(1, 1, n, c_partial[i]);
    c_final[poz] = i;
  }

  for (int i = 1; i <= n; i++)
  {
    out << c_final[i] << '\n';
  }

  return 0;
}