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≤T≤101≤N,Q≤1051≤L≤R≤NA is a permutation of numbers from 1 to N