#include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
void solve() {
string line;
while (getline(cin, line) && line != "-1") {
stringstream ss(line);
vector<int> b;
int val;
while (ss >> val) {
b.push_back(val);
}
int n = b.size();
vector<int> result(n, 0);
// 從數字 1 到 n 依序放入正確的位置
// b[i-1] 表示數字 i 前面有多少個比它大的數
// 也就是數字 i 應該放在「當前空位」中的第 b[i-1] + 1 個
for (int i = 1; i <= n; ++i) {
int pos_count = b[i - 1];
int current_empty = 0;
for (int j = 0; j < n; ++j) {
if (result[j] == 0) { // 找到空位
if (current_empty == pos_count) {
result[j] = i;
break;
}
current_empty++;
}
}
}
// 輸出結果
for (int i = 0; i < n; ++i) {
cout << result[i] << (i == n - 1 ? "" : " ");
}
cout << endl;
}
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
solve();
return 0;
}