#include using namespace std; typedef long long ll; int main(){ int n;cin >> n; vector x(n+2),y(n+2); int ans=1e9; for(int i=1;i<=n;i++){ cin >> x[i]; } for(int i=1;i<=n;i++){ cin >> y[i]; ans=min(ans,x[i]+y[i]); } cout << ans << endl; vector c(n+2); cout << 0 << endl; for(int i=1;i<=n;i++){ cout << min(ans,x[i]) << endl; } cout << ans << endl; }