n=int(input()) x=[int(i) for i in input().split()] y=[int(i) for i in input().split()] ans=[0] now=x[0]+y[0] ind=0 for i in range(1,n): if now>x[i]+y[i]: now=x[i]+y[i] ind=i print(now) print(0) print(*[now]*(n+1),sep="\n")