Mr. Zstu and Mr. Hdu are taking a boring class , Mr. Zstu comes up with a problem to kill time, Mr. Hdu thinks it’s too easy, he solved it very quickly, what about you guys?
Here is the problem:
Give you two sequences ${L_1,L_2,...,L_n}$ and ${R_1,R_2,...,R_n}$.
Your task is to find a longest subsequence ${v_1,v_2,...v_m}$ satisfies
$v_1 \geq 1$,$v_m \leq n$,$v_i < v_{i+1}$ .(for i from 1 to m - 1)
$L_{v_i} \geq L_{v_{i+1}}$,$R_{v_i} \leq R_{v_{i+1}}$(for i from 1 to m - 1)
If there are many longest subsequence satisfy the condition, output the sequence which has the smallest lexicographic order.