Exact match#5199

Exact match

1 second
128 megabytes
Very easy

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.

Input

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.

Output

For each query, output the position of the rightmost occurrence of the number in the array. If the number is not present, output zero.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading