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