#include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; vector A(N + 1), B(N + 1), C(N + 1); for (int i = 1; i <= N; i++) cin >> A[i]; for (int i = 1; i <= N; i++) cin >> B[i]; for (int i = 1; i <= N; i++) C[i] = i; vector ans(2 * N + 1); { auto D = atcoder::convolution_ll(A, C); for (int i = 1; i <= 2 * N; i++) ans[i] += D[i]; } { auto D = atcoder::convolution_ll(B, C); for (int i = 1; i <= 2 * N; i++) ans[i] += D[i]; } for (int i = 1; i <= 2 * N; i++) { cout << ans[i] << " \n"[i == 2 * N]; } }