n = int(eval(input()))

a1 = list(map(int, input().split()))

a2 = list(map(int, input().split()))

ans = 0

if n == 1:

    print((a1[0] + a2[0]))

    exit()

for i in range(1, n):

    ans = max(sum(a1[:i])+sum(a2[i-1:]), ans)

print(ans)

n = int(eval(input()))

a1 = list(map(int, input().split()))

a2 = list(map(int, input().split()))

sum_list = [sum(a1[:i]) + sum(a2[i-1:]) for i in range(1, n+1)]

print((max(sum_list)))



n = int(eval(input()))
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
ans = 0
if n == 1:
    print((a1[0] + a2[0]))
    exit()
for i in range(1, n):
    ans = max(sum(a1[:i]) + sum(a2[i - 1 :]), ans)
print(ans)

n = int(eval(input()))
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
sum_list = [sum(a1[:i]) + sum(a2[i - 1 :]) for i in range(1, n + 1)]
print((max(sum_list)))

-ans = 0 -if n == 1: -    print((a1[0] + a2[0])) -    exit() -for i in range(1, n): -    ans = max(sum(a1[:i]) + sum(a2[i - 1 :]), ans) -print(ans) +sum_list = [sum(a1[:i]) + sum(a2[i - 1 :]) for i in range(1, n + 1)] +print((max(sum_list)))