#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define FOR(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) #define REP(i, n) FOR(i, 0, n) #define rREP(i, n) for(int (i) = (n) - 1; (i) >= 0; --(i)) #define ALL(TheArray) TheArray.begin(), TheArray.end() using lli = long long int; using pii = std::pair; template inline bool chmax(T& a, T b){ if(a < b){a = b; return true;} return false; } template inline bool chmin(T& a, T b){ if(a > b){a = b; return true;} return false; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ constexpr int inf = 2e9; constexpr int MAX_SIZE = 2e5 + 10; int X[MAX_SIZE], Y[MAX_SIZE]; int main(void){ int n; scanf("%d", &n); int N = n + 2; REP(i, n) scanf("%d", X + i); REP(i, n) scanf("%d", Y + i); int d = inf; REP(i, n) chmin(d, X[i]+Y[i]); printf("%d\n0\n", d); REP(i, n) printf("%d\n", X[i]); printf("%d\n", d); return 0; }