A list of integers is given on the first line. Then $Q$ queries follow, each an index $i$ (which may be negative, Python-style). For each query print the element at that index.
Input
Line 1: the list. Line 2: $Q$. Next $Q$ lines: an index each (always valid).
Output
For each query, print the indexed element, one per line.
Example 1
Input
10 20 30 40 50 4 0 2 -1 -3
Output
10 30 50 30
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.