Apply permutation
In the Olympic swimming competition, another race has just concluded, and Petro has noted the order in which the athletes finished based on their lane numbers. For example, the record "2 0 1" indicates that the athlete in lane two won the gold medal, the athlete in lane zero took silver, and the athlete in lane one earned bronze. Note that lanes are numbered starting from zero. Petro also has the starting protocol, which shows the initial lane assignments. For instance, the protocol "Phelps Thorpe Popov" means Phelps started in lane zero, Thorpe in lane one, and Popov in lane two.
Petro now wants to create the final results table, listing the athletes' names in the order they finished. Your task is to assist him in this.
Input
The first line of input contains n (n < 100) numbers a_0, …, a_n-1 — representing the finishing order of the athletes by lane number. It is guaranteed that each number from 0 to n-1 appears exactly once.
The second line contains the starting protocol, which consists of n surnames (each a combination of Latin letters and digits without spaces), separated by spaces.
Output
Output the final results table by listing the surnames of the athletes in the order they finished. Print the surnames on a single line, separated by a single space.