a = list(map(int,input().split())) b = list(map(int,input().split())) print(*[b[a[i]-1] for i in range(5)])