#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Ranald the cat is implementing a ballot system to select *C* students to attend CS3233. However, he doesn't know how to implement it!

So, if you code it for him, you should stand a higher chance in going to attend CS3233.

## Ballot System Description

Each student gets to choose his/her unique ballot number from 1 to 1000000000. Furthermore, there will be *N* students labelled from *1* to *N*.

In order to select a student, Ranald chooses a number from 1 to 1000000000 as well. The student whose ballot number is the closest to the number Ranald selects will get to go for CS3233! In the event that 2 students are concurrently closest to the number selected, the student with a lower ballot number will get to go! Once a student is selected, his ballot ticket will be removed from the ballot system.

## Limits

Subtask 1 (20%): 0 < *C* ≤ *N* ≤ 100.

Subtask 2 (30%): 0 < *C* ≤ *N* ≤ 1000.

Subtask 3 (50%): 0 < *C* ≤ *N* ≤ 100000.

## Input

The first line of input consists of 2 integers, *N* followed by *C*.

The following line will consist of *N* integers, which are the ballot number of the students. The *i ^{th}* number in this line is the ballot number of the

*i*student (student with label

^{th}*i*).

The following line will consist of *C* integers, which are the numbers that Ranald picks. These numbers are provided in chronological order, where the first number is selected first.

## Output

Output *C* lines with 1 integer each. These *C* integers should denote which students will get to attend CS3233 (print their student labels) in any order.

## Sample Input 1

5 3 10 13 14 9 15 12 12 12

## Sample Output 1

2 1 3

## Explanation for Sample Output 1

When Ranald chose the number '12', the ballot number of '13' is the closest to 12. Therefore, the corresponding student '2' gets selected for CS3233.

When Ranald chose the number '12' again, number '10' and '14' are of equal distance to 12. Therefore, the student with the lower ballot number ('10') will get to go for CS3233. (This is student '1').

When Ranald chose the number '12' yet again, '14' is the closest to 12. Therefore, the corresponding student '3' gets selected for CS3233. This is because the ballot numbers of '10' and '13' have already been removed from the system.

## Sample Input 2

5 3 10 13 14 9 15 12 12 12

## Sample Output 2

1 2 3

## Explanation for Sample Output 2

Same as above, but in a different order of output.

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 20 | 10 | 1s | 64MB | Minimum |

2 | 30 | 20 | 1s | 64MB | Minimum |

3 | 50 | 20 | 1s | 64MB | Minimum |

4 | 0 | 2 | 1s | 64MB | Minimum |

### Judge Compile Command

g++ ans.cpp -o ballot -Wall -static -O2 -lm -m64 -s -w -std=gnu++14 -fmax-errors=512