N=int(input()) X=list(map(int,input().split())) Y=list(map(int,input().split())) ans=10**100 for i in range(N): ans=min(ans,X[i]+Y[i]) print(ans) for i in range(N+1): if i==0: print(0) continue else: if ans>=X[i-1]: print(X[i-1]) elif ans