import numpy as np

N = int(eval(input()))

first = np.array([int(i) for i in input().split()])

second = np.array([int(i) for i in input().split()])

fstsum = np.cumsum(first)

scdsum = np.cumsum(second[::-1])[::-1]

result = 0

for i in range(N):

    res = fstsum[i] + scdsum[i]

    if result < res:

        result = res

print(result)
N = int(eval(input()))

first = [int(i) for i in input().split()]

second = [int(i) for i in input().split()]

result = 0

for i in range(N+1):

    res = sum(first[:i]) + sum(second[i-1:])

    if result < res:

        result = res

print(result)
import numpy as np

N = int(eval(input()))
first = np.array([int(i) for i in input().split()])
second = np.array([int(i) for i in input().split()])
fstsum = np.cumsum(first)
scdsum = np.cumsum(second[::-1])[::-1]
result = 0
for i in range(N):
    res = fstsum[i] + scdsum[i]
    if result < res:
        result = res
print(result)

N = int(eval(input()))
first = [int(i) for i in input().split()]
second = [int(i) for i in input().split()]
result = 0
for i in range(N + 1):
    res = sum(first[:i]) + sum(second[i - 1 :])
    if result < res:
        result = res
print(result)

-import numpy as np - -first = np.array([int(i) for i in input().split()]) -second = np.array([int(i) for i in input().split()]) -fstsum = np.cumsum(first) -scdsum = np.cumsum(second[::-1])[::-1] +first = [int(i) for i in input().split()] +second = [int(i) for i in input().split()] -for i in range(N): -    res = fstsum[i] + scdsum[i] +for i in range(N + 1): +    res = sum(first[:i]) + sum(second[i - 1 :])