Given an array of integers sorted in non-decreasing order, your task is to write a program that handles queries of the following type:
- For a given number x_i, determine the position of its rightmost occurrence in the array.
The first line of the input contains two natural numbers and (1 \leq n, m \leq 100000). The second line contains integers representing the array . The next lines each contain a query number x_i. Both the elements of the array and the query numbers can have absolute values up to 10^9.
For each query, output the position of the rightmost occurrence of the number in the array. If the number is not present, output zero.
Example 1
Example 2