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