import numpy as np

N = int(eval(input()))

A = np.array(list(map(int, input().split())))

B = np.array(list(map(int, input().split())))

A_sum = np.cumsum(A)

B_sum = np.cumsum(B[::-1])[::-1]

li = []

for i in range(N):

    li.append(A_sum[i]+B_sum[i])

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

A = [list(map(int, input().split())) for _ in range(2)]

b = [0] + A[0]

c = [0] + A[1]



if N == 1:

    print((A[0][0] + A[1][0]))

    exit()



for i in range(1, N):

    b[i+1] += b[i]

    c[i+1] += c[i]





ans = 0

for i in range(1, N):

    tmp = (b[i]-b[0]) + (c[-1]-c[i-1])

    ans = max(ans, tmp)



print(ans)
import numpy as np

N = int(eval(input()))
A = np.array(list(map(int, input().split())))
B = np.array(list(map(int, input().split())))
A_sum = np.cumsum(A)
B_sum = np.cumsum(B[::-1])[::-1]
li = []
for i in range(N):
    li.append(A_sum[i] + B_sum[i])
print((max(li)))

N = int(eval(input()))
A = [list(map(int, input().split())) for _ in range(2)]
b = [0] + A[0]
c = [0] + A[1]
if N == 1:
    print((A[0][0] + A[1][0]))
    exit()
for i in range(1, N):
    b[i + 1] += b[i]
    c[i + 1] += c[i]
ans = 0
for i in range(1, N):
    tmp = (b[i] - b[0]) + (c[-1] - c[i - 1])
    ans = max(ans, tmp)
print(ans)

-import numpy as np - -A = np.array(list(map(int, input().split()))) -B = np.array(list(map(int, input().split()))) -A_sum = np.cumsum(A) -B_sum = np.cumsum(B[::-1])[::-1] -li = [] -for i in range(N): -    li.append(A_sum[i] + B_sum[i]) -print((max(li))) +A = [list(map(int, input().split())) for _ in range(2)] +b = [0] + A[0] +c = [0] + A[1] +if N == 1: +    print((A[0][0] + A[1][0])) +    exit() +for i in range(1, N): +    b[i + 1] += b[i] +    c[i + 1] += c[i] +ans = 0 +for i in range(1, N): +    tmp = (b[i] - b[0]) + (c[-1] - c[i - 1]) +    ans = max(ans, tmp) +print(ans)