import numpy as np



N=int(eval(input()))

num_list=[]

while True:

    try:

        num_list.append(list(map(int,input().split())))



    except:

        break;



sum_list=[]

for k in range(N):

  sum_list.append(sum(num_list[0][0:k+1])+sum(num_list[1][k:N+1]))

          

print((max(sum_list)))
N=int(eval(input()))

num_list=[]

while True:

    try:

        num_list.append(list(map(int,input().split())))

    except:

        break;



sum_list=[]

for k in range(N):

  sum_list.append(sum(num_list[0][0:k+1])+sum(num_list[1][k:N+1]))

          

print((max(sum_list)))
import numpy as np

N = int(eval(input()))
num_list = []
while True:
    try:
        num_list.append(list(map(int, input().split())))
    except:
        break
sum_list = []
for k in range(N):
    sum_list.append(sum(num_list[0][0 : k + 1]) + sum(num_list[1][k : N + 1]))
print((max(sum_list)))

N = int(eval(input()))
num_list = []
while True:
    try:
        num_list.append(list(map(int, input().split())))
    except:
        break
sum_list = []
for k in range(N):
    sum_list.append(sum(num_list[0][0 : k + 1]) + sum(num_list[1][k : N + 1]))
print((max(sum_list)))

-import numpy as np -