N=int(input()) xs = list(map(int, input().split())) ys = list(map(int, input().split())) m = min([x+y for x, y in zip(xs, ys)]) print(m) print(0) for x, y, i in zip(xs, ys, list(range(N+1))): print(max(0, m-y)) print(m)