You are given a permutation of \(N\) numbers that are denoted by array \(A\).
You are also given \(Q\) queries of the form:
Find the answer for \(Q\) queries.
Note: Assume 1 based indexing.
Input format
Output format
For each test case, print \(Q\) space-separated integers denoting the answer for queries in a new line.
Constraints
\(1 \le T \le 10 \\ 1 \le N, Q \le 10^5 \\ 1 \le L \le R \le N \\ \text{A is a permutation of numbers from 1 to N}\)