AT_abc433_b [ABC433B] Nearest Taller

Description

There are $ N $ people standing in a row from left to right. The $ i $ -th person from the left $ (1\le i\le N) $ is called person $ i $ . The height of person $ i $ $ (1\le i\le N) $ is $ A_i $ . For each $ i=1,2,\ldots,N $ , determine whether there exists a person to the left of person $ i $ who is taller than person $ i $ , and if so, find the person standing closest to person $ i $ among them.

Input Format

The input is given from Standard Input in the following format: > $ N $ $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $

Output Format

Output $ N $ lines. The $ i $ -th line $ (1\le i\le N) $ should contain $ -1 $ if there is no person to the left of person $ i $ who is taller than person $ i $ , and otherwise, the number representing the person standing closest to person $ i $ among such people.

Explanation/Hint

### Sample Explanation 1 - There is no person to the left of person $ 1 $ . Thus, output $ -1 $ on the first line. - Among the people to the left of person $ 2 $ , only person $ 1 $ is taller than person $ 2 $ . Thus, output $ 1 $ on the second line. - Among the people to the left of person $ 3 $ , persons $ 1,2 $ are taller than person $ 3 $ , and the person standing closest to person $ 3 $ is person $ 2 $ . Thus, output $ 2 $ on the third line. - There is no person to the left of person $ 4 $ who is taller than person $ 4 $ . Thus, output $ -1 $ on the fourth line. ### Sample Explanation 2 There may be multiple people with the same height. ### Constraints - $ 1\le N\le 100 $ - $ 1\le A_i\le 100 $ - All input values are integers.