n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = list(map(int,input().split()))

ans = 0
tmp = -100
for i in a:
	ans += b[i-1]
	print(ans)
	if i == tmp+1:
		ans += c[tmp-1]
	tmp = i

print(ans)