Олимпиадный тренинг

Задача 42973. Series


Задача

Темы:
In her free time, Dasha loves to watch animated series based on comics. She has already chosen the animated series to watch, but there is one problem. Quite often, in film adaptations of comics, the series is not filmed sequentially according to the chronology of events, but in some strange order. 
To save herself from confusion, Dasha decided that she would choose and watch exactly three episodes, moreover, so that the numbers of these episodes were in ascending order and the years in which the events took place in the episodes also went in ascending order. For each series, it is known in which year the events of this series take place.
Help Dasha find three suitable episodes to watch.

Input
The first line of the input contains a single integer N — number of episodes (3 <= N <= 105 ).
Each of the next N lines contains one integer — the year in which the events of the next series take place (each year is an integer from 1 to 109 inclusive).

Imprint
The program should output three integers i, j, k (1 <= i < j < k <= N) — numbers of the desired three series. The series are numbered from 1 to N. If there are several answers, print any of them. If there is no answer, print one number zero.
Examples
# Input Output
1 4
1985 2000
1990
2005
1 2 4
2 4
2000
2000
2001
2001
0

Note
In the first example, you need to select episodes 1, 2, 4, which take place in 1985, 2000 and 2005 respectively.
In the second example, it is impossible to select three series that satisfy the conditions of the problem.