import numpy as np

n = int(eval(input()))

a = np.array([list(map(int,input().split())) for i in range(2)])



cnt = [0] * (n)

for i in range(0, n):

    cnt[i] = sum(a[0, :i+1]) + sum(a[1, i:])



print((max(cnt)))

             
n = int(eval(input()))

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

cnt = [sum(a[0][:i+1]) + sum(a[1][i:]) for i in range(n)]

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

n = int(eval(input()))
a = np.array([list(map(int, input().split())) for i in range(2)])
cnt = [0] * (n)
for i in range(0, n):
    cnt[i] = sum(a[0, : i + 1]) + sum(a[1, i:])
print((max(cnt)))

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

-import numpy as np - -a = np.array([list(map(int, input().split())) for i in range(2)]) -cnt = [0] * (n) -for i in range(0, n): -    cnt[i] = sum(a[0, : i + 1]) + sum(a[1, i:]) +a = [list(map(int, input().split())) for i in range(2)] +cnt = [sum(a[0][: i + 1]) + sum(a[1][i:]) for i in range(n)]