#K54932. Monster Removal Order

    ID: 29863 Type: Default 1000ms 256MiB

Monster Removal Order

Monster Removal Order

You are given n monsters standing in a line. Each monster has a certain amount of health. The monsters are labeled from 1 to n according to their initial positions. The process follows a cyclic order: starting from the first monster, decrease the health of the current monster by 1. If a monster's health becomes 0 or less, it is removed from the line and its label is recorded in the removal order. Otherwise, move to the next monster (wrapping around when reaching the end) and continue the process. Your task is to determine the order in which the monsters are removed.

The process continues until all monsters have been removed.

Note: The monsters are processed in a cyclic manner. When a monster is removed, the cycle continues with the next monster in the remaining list.

inputFormat

The first line contains a single integer n, denoting the number of monsters.

The second line contains n space-separated integers, where the i-th integer denotes the health of the i-th monster.

outputFormat

Output a single line containing the labels of the monsters in the order they are removed, separated by a single space.

## sample
3
3 1 2
2 3 1