n = int(eval(input()))

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

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

count = 0

max1 = 0

for i in range(n):

    for j in range(n):

        if j < i:

            count += a1[j]

        elif j==i:

            count += (a1[j] + a2[j])

        else:

            count += a2[j]

    if max1 < count:

        max1 = count

    count = 0

print (max1)
n = int(eval(input()))

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

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

m = 0

for i in range(n):

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

print (m)
n = int(eval(input()))
a1 = list(map(int, input().split()))
a2 = list(map(int, input().split()))
count = 0
max1 = 0
for i in range(n):
    for j in range(n):
        if j < i:
            count += a1[j]
        elif j == i:
            count += a1[j] + a2[j]
        else:
            count += a2[j]
    if max1 < count:
        max1 = count
    count = 0
print(max1)

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

-count = 0 -max1 = 0 +m = 0 -    for j in range(n): -        if j < i: -            count += a1[j] -        elif j == i: -            count += a1[j] + a2[j] -        else: -            count += a2[j] -    if max1 < count: -        max1 = count -    count = 0 -print(max1) +    m = max(m, sum(a1[: i + 1]) + sum(a2[i:])) +print(m)