#include #define rep(i,n) for(int i=(0);i<(n);i++) using namespace std; typedef long long ll; typedef pair pll; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vector x(n), y(n); rep(i, n) cin >> x[i]; rep(i, n) cin >> y[i]; int mn = 1e9; rep(i, n) mn = min(mn, x[i] + y[i]); cout << 0 << "\n"; rep(i, n){ cout << max(mn - y[i], 0) << "\n"; } cout << mn << "\n"; }