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