length = int(eval(input()))

first = input().split(" ")

second = input().split(" ")

i = 0

sweet = 0

sugars = 0

while i < length:

    j = i

    k = 0

    while k<=i:

        sweet = sweet + int(first[k])

        k = k + 1

    while j < length:

        sweet = sweet + int(second[j])

        j = j + 1

    if sweet > sugars:

        sugars = sweet

    sweet = 0

    i = i + 1

print(sugars)

n = int(eval(input()))

l = []

temp = []

for i in range(0,2):

    temp = [int(x) for x in input().split()]

    l.append(temp)



cost=[]



for i in range(0,n):  # i = length

    price=0

    for j in range(0,i+1):

        price+=l[0][j]



    for k in range(i,n):

        price+=l[1][k]

    cost.append(price)



print((max(cost)))
length = int(eval(input()))
first = input().split(" ")
second = input().split(" ")
i = 0
sweet = 0
sugars = 0
while i < length:
    j = i
    k = 0
    while k <= i:
        sweet = sweet + int(first[k])
        k = k + 1
    while j < length:
        sweet = sweet + int(second[j])
        j = j + 1
    if sweet > sugars:
        sugars = sweet
    sweet = 0
    i = i + 1
print(sugars)

n = int(eval(input()))
l = []
temp = []
for i in range(0, 2):
    temp = [int(x) for x in input().split()]
    l.append(temp)
cost = []
for i in range(0, n):  # i = length
    price = 0
    for j in range(0, i + 1):
        price += l[0][j]
    for k in range(i, n):
        price += l[1][k]
    cost.append(price)
print((max(cost)))

-length = int(eval(input())) -first = input().split(" ") -second = input().split(" ") -i = 0 -sweet = 0 -sugars = 0 -while i < length: -    j = i -    k = 0 -    while k <= i: -        sweet = sweet + int(first[k]) -        k = k + 1 -    while j < length: -        sweet = sweet + int(second[j]) -        j = j + 1 -    if sweet > sugars: -        sugars = sweet -    sweet = 0 -    i = i + 1 -print(sugars) +n = int(eval(input())) +l = [] +temp = [] +for i in range(0, 2): +    temp = [int(x) for x in input().split()] +    l.append(temp) +cost = [] +for i in range(0, n):  # i = length +    price = 0 +    for j in range(0, i + 1): +        price += l[0][j] +    for k in range(i, n): +        price += l[1][k] +    cost.append(price) +print((max(cost)))