A=list(map(int,input().split())) B=list(map(int,input().split())) C=[] for i in range(5): c=B[A[i]-1] C.append(c) print(*C)