By Unknown Brasil
There is no moment of greatest anguish among the movie stars that the ceremony of delivery of the statues at the Kodak Theatre. Are not rare actors and actresses who see their pulse reaching alarming levels. The risk of a heart attack grows when the beats become more and faster in consecutive periods, suggesting a period of great anxiety.
Concerned about this fact, the Academy of Arts and Sciences in Hollywood decided to monitor the heartbeat, at regular intervals, of several candidates to receive the statuette. With these data they intend to make a program that alerts doctors on call if one of the famous is on the verge of a heart attack. Your task in this problem is to assist the Academy in this noble mission.
Several instances are given. The first line of each instance contains the number 0 ≤ n ≤ 1000 of actors/actresses monitored (which will be identified by numbers 1, 2, ..., n) and the number 0 ≤ m ≤ 100 beats observed in these actors. Then, in each of the next n lines are given the measurement m (the heartbeat is an integer between 0 and 200). The case in which n = 0 represents the end of the file and it must not be processed.
You will need to print a header indicating the number of the instance that you are handling (Instancia # i) and in the following line, the number of the actor / actress who is most at risk of suffering a heart attack. The risk for heart attack increases with the number of consecutive observations when the number of beats increased. If there is a tie on this criterion, return the actor who has the biggest difference between the first and last measurement interval, where the beats were increasing. If the tie persists, the risk will be higher for those with the highest rate at the end of the interval. If there is still no decision, return the lowest index.
A blank line must be printed after each output instance.
|Sample Input||Sample Output|