#include <cstdio>

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

const int N = 1 << 18;
const int M = 1 << 9;

int x, n, p[N], is[N], num[M], t[N];

int main()
{
  freopen("invers2.in", "r", stdin);
  freopen("invers2.out", "w", stdout);

  forn(i, M)
    num[i] = M;
  while (scanf("%d", &x) == 1)
  {
    int i = 0;
    for (x++; num[i] < x; i++)
      x -= num[i];

    int j = i * M - 1;
    while (x-- > 0)
      for (j++; is[j]; j++)
        ;
    is[j] = 1, num[i]--, p[n++] = j;
  }

  forn(i, n)
  {
    is[p[i]] = i;
    for (int j = p[i]; j >= 0; j &= j + 1, j--)
      is[p[i]] -= t[j];
    for (int j = p[i]; j < n; j |= j + 1)
      t[j]++;
  }
  forn(j, n)
    printf("%d ", is[j]);
  return 0;
}
