#include <iostream> #include <string> #include <stdio.h> #include <vector> #include <list> #include <algorithm> using namespace std; int main() { int n; cin >> n; list<int> arr; for (int i = 0; i < n; ++i) { int t; cin >> t; arr.push_back(t); } vector<int> ans(n,0); int index = 1; while (!arr.empty()) { int now = arr.front(); arr.pop_front(); int t =  now; auto ite = ans.begin(); int i = 0; while (i < t) { if (*ite == 0) ++i; ++ite; } while (*ite != 0) ++ite; *ite = index; ++index; } for (auto i : ans) cout << i << ' '; cout << endl; }