#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;

    vector<int> a(n);
    for (auto &it : a)
        cin >> it;

    vector<int> places;
    for (int iter = 0; iter < n; iter++)
    {
        const int i = int(find(a.begin(), a.end(), 0) - a.begin());
        assert(i != n);
        places.push_back(i);
        for (int j = 0; j <= i; j++)
            a[j]--;
        assert(a[i] == -1);
    }

    reverse(places.begin(), places.end());
    for (int i = 0; i < n; i++)
        cout << places[i] + 1 << " \n"[i + 1 == n];
}
