#include using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); //1:A_1 //2:2A_1, 1A_2 //3:3A_1, 2A_2, 1A_3 //4:3A_2, 2A_3 //5:3A_3 ll N, sm, sm2; cin >> N; vector ans(N*2+1); vector A(N), SA(N+1); for(int i = 0; i < N; ++i){ cin >> A[i]; SA[i+1] = SA[i] + A[i]; } vector B(N), SB(N+1); for(int i = 0; i < N; ++i){ cin >> B[i]; SB[i+1] = SB[i] + B[i]; } sm = 0; sm2 = 0; for (int i=1; i<=N; i++){ sm += SA[i]; sm2 += SB[i]; ans[i+1] = sm+sm2; } for (int i=N+1; i<=N*2-1; i++){ sm += SA[N] - SA[i-N] - N*A[i-N-1]; sm2 += SB[N] - SB[i-N] - N*B[i-N-1]; ans[i+1] = sm+sm2; } for (int i=1; i<=N*2; i++) cout << ans[i] << " "; cout << endl; return 0; }