readlist = lambda: list(map(int, input().split())) A = readlist() B = readlist() ans = [] for i in B: ans.append(A[i-1]) print(*ans)