#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector a(n + 1), b(n + 1); for (int i = 0; i < n; i++) { int t; cin >> t; a[i + 1] = a[i] + t; } for (int i = 0; i < n; i++) { int t; cin >> t; b[i + 1] = b[i] + t; a[i + 1] += b[i + 1]; } vector c(n * 2); for (int i = 0; i < n; i++) { c[i + 1] = c[i] + a[i + 1]; } for (int i = 0; i < n - 1; i++) { c[n + i + 1] = c[n + i] - (a[i + 1] - a[i]) * n + a[n] - a[i + 1]; } for (int i = 0; i < n * 2; i++) { cout << c[i] << " \n"[i == n * 2 - 1]; } return 0; }