A list of integers is given. For each of $Q$ queried values (each guaranteed to be present), print the 0-based index of its first occurrence.
Input
Line 1: the list. Line 2: $Q$. Next $Q$ lines: a value each (present).
Output
Print the first index for each query, one per line.
Example 1
Input
5 3 5 7 3 3 5 3 7
Output
0 1 3
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.