#000356

O-minomory

Peda, Nikola, Sloba and Tea are spending their preparations for fifth Bubble cup in 2012 playing the minomory game. The game consists of players taking a peek on an array of N different numbers for 10 seconds. After that, they have to answer Q number of questions which are asked by their mental-conditioning coach Mina. This way they practice the technique of broadband view. Each player then answers at what position in the array is a certain number. If the number is not in the array, the answer is 0.



InputFrom the standard input read an integer N (0 < N <= 100 000) representing the number of elements in the array.
In the second row, there are N numbers Ai (0 <= Ai < 10 000 000) seperated by a space.
In the third row of input there is an integer Q (0 < Q <= 100 000) representing the number of queries.
In each of the next Q lines there is an integer Qi (0 <= Qi < 10 000 000).


OutputThe output consists of Q lines. For every number Qi you need to print the position of number Qi in the given array, or print 0 if the number is not in the array.



Input:
10
100 233 5 9 11 698 1234 25 113 654
6
233
234
654
1000000
11
100

Output:
2
0
10
0
5
1

Submit solution

Coming later

The grading service will be connected in a later migration step. You can inspect the task and your previous results now.