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 \le N,\ Q\le 10^5)}\\ {(1 \le A_i \le 10^9)}\\ {(1 \le Q_i\le 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)