#CCBCHBAHAI0000113. Lost Lineup

Lost Lineup

Lost Lineup

Source: Kattis

Version: Phuoc Hung OJ Extended

Problem

Person 1 (Jimmy) is first. For each person i≥2i\ge2, did_i is the number of people between that person and Jimmy. Hence its 1-based position is di+2d_i+2, equivalently ans[d_i+1]=i in a 0-based array. The distances form a permutation of 0,…,n−20,\ldots,n-2.

Input

The first line contains nn. If n>1n>1, the next line contains d2,…,dnd_2,\ldots,d_n.

Output

Print the reconstructed lineup.

Subtask

Subtask 1 (20 points): 1≤n≤101\le n\le10.

Subtask 2 (30 points): 1≤n≤501\le n\le50.

Subtask 3 (50 points): 1≤n≤1001\le n\le100.

Example

Input

4
1 2 0

Output

1 4 2 3

Explanation

Distance 0 is immediately behind Jimmy; the other distances determine the remaining positions.