Олимпиадный тренинг

Задача 44931. Last element > x


Given an array of n numbers, sorted in non-increasing order, and k queries. For each query, print the maximum number of the array element greater than the given one (numbering of array elements starts from 1).


Input

The first line of the input contains numbers n and k (0 < n, k <= 105 ) — array length and number of requests. The second line contains the n elements of an array sorted in non-ascending order. The third line contains k requests. All array elements and — integers, each of which does not exceed 2⋅109 .


Output

For each of k queries, output the maximum number of the array element greater than the given one. If there are none, print 0.

 
Examples
# Input Output
1
5 5
9 8 5 3 3
2 4 8 1 10
5
3
1
5
0