#include #define rep(i,n) for(int i = 0; i < (n); ++i) using namespace std; typedef long long ll; int main(){ int n; cin >> n; vector x(n); vector y(n); vector tapi(n+1); long long tap; rep(i,n) cin >> x[i]; rep(i,n) cin >> y[i]; tapi[0] = 0; tap = 1000000000000000000; for(int i = 1; i < n+1; ++i){ tapi[i] = x[i-1]; if(tap > tapi[i] + y[i-1]){ tap = tapi[i] + y[i-1]; } } cout << tap - tapi[0] << endl; for(int i = 0; i < n+1; ++i){ cout << tapi[i] << endl; } cout << tap << endl; return 0; }