You are given an array A of Q integers and Q queries. In each query, you are given an integer i (1≤i≤N).
Your task is to find the minimum index greater than i (1≤i≤N) such that:
If there is no answer, then print -1.
Input format
Output format
Print the answer as described in the problem
Constraints
(1≤N, Q≤105)(1≤Ai≤109)(1≤Qi≤N)
In the first quary 70 grater than 62 and sum of digits of 62 = 8 grater than sum f digits of 70=7 (8>7)