#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, pre = -1, m = 0, tmp;
  cin >> n;
  int a[n], b[n + 1], c[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i < n + 1; i++) cin >> b[i];
  for (int i = 1; i < n; i++) cin >> c[i];
  for (int i = 0; i < n; i++) {
    tmp = a[i];
    cout << c[pre] << endl;
    m += b[tmp];
    if (tmp - pre == 1) m += c[pre];
    pre = tmp;
  }
  cout << m << endl;
}
