- Time limit: 1.00 s
- Memory limit: 512 MB
Maija is sorting her coin collection by size. She has coins numbered and a sloped surface that has holes in it numbered . The -th coin has radius and the -th hole has radius . Hole number is at the top of the slope and hole number is at the bottom. For each coin, find the number of the hole it falls to when Maija lets it slide from the top. The end of the slope is interpreted as hole .
Input
The first line contains two integers and . The second line contains integers . The third line contains integers .
Output
Print the hole numbers on a single line as .
Constraints
Example 1
Input:
10 11 4 4 4 6 6 3 7 9 6 4 1 2 3 3 4 4 7 8 9 10 10
Output:
5 5 5 7 7 3 7 9 7 5
Example 2
Input:
10 11 10 8 7 9 4 1 2 4 3 10 3 6 4 4 4 6 6 3 7 9 6
Output:
12 10 9 10 2 1 1 2 1 12