N=int(input()) A=list(map(int, input().split())) B=list(map(int, input().split())) d=10**7 for i in range(N): d=min(d,A[i]+B[i]) print(d) print(0) for i in range(N): print(min(d,A[i])) print(d)