#include using namespace std; #define fs first #define sc second #define pb push_back #define mp make_pair #define eb emplace_back #define ALL(A) A.begin(),A.end() #define RALL(A) A.rbegin(),A.rend() typedef long long LL; typedef pair P; LL mod=1000000007; LL LINF=1LL<<60; const int INF=1<<30; int dx[]={1,0,-1,0}; int dy[]={0,1,0,-1}; int main(){ int n;cin >> n; vector x(n),y(n); for (int i = 0; i < n; i++) { cin >> x[i]; } for (int i = 0; i < n; i++) { cin >> y[i]; } int ans = INF; for (int i = 0; i < n; i++) { ans = min(ans,x[i]+y[i]); } cout << ans << endl; cout << 0 << endl; for (int i = 0; i < n; i++) { cout << min(ans,x[i]) << endl; } cout << ans << endl; return 0; }