b = list(map(int, input().split()))
a = list(map(lambda x: int(x)-1, input().split()))
ans = [b[v] for v in a]
print(*ans)