import numpy as np



N = int(eval(input()))



cnt1 = np.cumsum(list(map(int, input().split())))

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

cnt2 = cnt2[::-1]

cnt2 = np.cumsum(cnt2)

cnt2 = cnt2[::-1]



max_candies = 0



for i in range(N):

    if max_candies <= cnt1[i] + cnt2[i]:

        max_candies = cnt1[i] + cnt2[i]



print(max_candies)

N = int(eval(input()))

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

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

 

max_candies = 0

 

for i in range(N):

    temp = sum(cnt1[:i + 1]) + sum(cnt2[i:])

    max_candies = max(temp, max_candies)

 

print(max_candies)
import numpy as np

N = int(eval(input()))
cnt1 = np.cumsum(list(map(int, input().split())))
cnt2 = list(map(int, input().split()))
cnt2 = cnt2[::-1]
cnt2 = np.cumsum(cnt2)
cnt2 = cnt2[::-1]
max_candies = 0
for i in range(N):
    if max_candies <= cnt1[i] + cnt2[i]:
        max_candies = cnt1[i] + cnt2[i]
print(max_candies)

N = int(eval(input()))
cnt1 = list(map(int, input().split()))
cnt2 = list(map(int, input().split()))
max_candies = 0
for i in range(N):
    temp = sum(cnt1[: i + 1]) + sum(cnt2[i:])
    max_candies = max(temp, max_candies)
print(max_candies)

-import numpy as np - -cnt1 = np.cumsum(list(map(int, input().split()))) +cnt1 = list(map(int, input().split())) -cnt2 = cnt2[::-1] -cnt2 = np.cumsum(cnt2) -cnt2 = cnt2[::-1] -    if max_candies <= cnt1[i] + cnt2[i]: -        max_candies = cnt1[i] + cnt2[i] +    temp = sum(cnt1[: i + 1]) + sum(cnt2[i:]) +    max_candies = max(temp, max_candies)