#include #define all(vec) vec.begin(), vec.end() using namespace std; using ll = long long; using P = pair; constexpr ll INF = (1LL << 30) - 1LL; constexpr ll LINF = (1LL << 60) - 1LL; constexpr ll MOD = 1e9 + 7; template void chmin(T &a, T b) { a = min(a, b); } template void chmax(T &a, T b) { a = max(a, b); } int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector x(n), y(n); ll d = LINF; for (int i = 0; i < n; i++) { cin >> x[i]; } for (int i = 0; i < n; i++) { cin >> y[i]; chmin(d, x[i] + y[i]); } cout << d << endl; cout << 0 << endl; for (int i = 0; i < n; i++) { cout << min(d, x[i]) << endl; } cout << d << endl; }