n = int(input())
an = list(map(int, input().split()))
bn = list(map(int, input().split()))
cn = list(map(int, input().split()))

ans = 0
before_i = 100
for i in an:
    ans += bn[i-1]
    print(bn[i-1])
    if (i-before_i) == 1:
        ans += cn[before_i-1]
        print(cn[before_i -1])
    before_i = i
print(ans)