N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

i = 0
point = 0
while i < len(A):
    point += B[A[i]-1]
    print(point)
    if i != 0 and A[i-1] + 1 == A[i]:
        point += C[A[i-1]-1]
    i += 1
print(point)
