N = int(input())
Ai = [int(i) for i in input().split(" ")]
Bi = [int(i) for i in input().split(" ")]
Ci = [int(i) for i in input().split(" ")]

res = 0
pre_i = None
for i in Ai:
  res += Bi[i-1]
  if i == pre_i+1:
    res += Ci[i-1]
  pre_i = i

  print(res)