We call W a k-best number of sequence B_1...m if there exists a sequence C_1...k satisfying the following two conditions:
Given a sequence A_1...n, you need to answer Q questions. Each question consists of three integers L,R,K, and you need to calculate the minimum K-best number of A_L...R.
Recall that C is a subsequence of B if and only if we can obtain C by removing some elements of B (possibly none or all).
The first line contains two integers n and Q (1≤n,Q≤105).
The second line contains n integers A_1...n (0≤A_i≤109).
Then Q lines follow. Each of them contains three integers L,R,K, representing a question (1≤L≤R≤n; 1≤K≤R−L+1).
For each question, output a single line with a single integer: the answer.