#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  int x = 0;
  int y = -2;
  cin >> N;
  int A[N];
  int B[N];
  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];
  for (int i = 0; i < N; i++) {
    x += B[A[i] - 1];
    cout << x << endl;
    if (A[i] == y + 1) x += C[y - 1];
    cout << x << endl;
    y = A[i];
  }
  cout << x << endl;
  return 0;
}
