#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;

using ordered_set =
tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;

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

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

    ordered_set rem_pos;
    for (int i = 0; i < n; i++)
        rem_pos.insert(i);

    vector<int> where(n);
    for (int i = 0; i < n; i++)
    {
        const auto it = rem_pos.find_by_order(a[i]);
        assert(it != rem_pos.end());

        where[i] = n - 1 - (*it);
        rem_pos.erase(it);
    }

    vector<int> p(n);
    for (int i = 0; i < n; i++)
        p[where[i]] = i;

    for (int i = 0; i < n; i++)
        cout << p[i] + 1 << " \n"[i + 1 == n];
}
