beecrowd | 2851
# Rangel's Challenge

**Timelimit: 1**

By Diego Rangel, FACIT Brazil

Rangel is a computer engineer who, in his spare time, loves to create fun games to entertain his friends.

One day, a teacher asked him to create a game that involved data structures so that the freshmen of his university would lose the fear of AEDs (Algorithms and Data Structures).

Due to the great difficulty of students with AEDs, Rangel created a game based on the indices of a array and gave the name "Rangel’s Challenge" (a very interesting game that can be played on any platform).

The Rangel’s Challenge game works as follows:

- A array V with
**n**elements is generated; - For every
**a**_{i }**a**_{j}**a**and should appear then_{i}**a**, that is_{i}**a**>_{j}**a**and_{i}**j**>**i**, and it must be as close as possible to**a**. It is possible that there is no_{i}**a**that satisfy the condition, so the answer is “_{j}*****”; - The player must enter a array M such that | M | = | V | and the game says whether he hit or not.

For example the array V = [1, 4, 7, 5], for **a _{1}** = 1 the answer will be 4 which is in position

Rangel has no time to feed the database with the correct answers as he is preparing for a competition and asks you to create the answers for him, because the semester is almost starting and the teacher is waiting for the game.

Given array V, you must create an algorithm that generates the sequence M following the rules of the game.

The first line consists of single integer **n** (1 ≤ **n** ≤ 100000) which indicates the size of the array.

The next line contains **n** integers **a _{i}** (1 ≤

Print **n** values separated by a space following the problem's specifications, if there is no response for the ith element of V, print “*****” without the quotation marks.

Input Samples | Output Samples |

4 1 4 7 5 |
4 7 * * |

2 1 2 |
2 * |