nums = int(eval(input()))

ary = [0,0]

for i in range(2):

    ary[i] = list(map(int,input().split()))



max = 0



for i in range(nums):

    h = 0

    w = 0

    count = ary[h][w]

    for x in range(nums):

        if i == x :

            h = 1

            count += ary[h][w]

            continue

        w += 1

        count += ary[h][w]

    if count > max :

        max = count

print(max)
n = int(eval(input()))

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

b = list(map(int,input().split()))[::-1]

dp = [b[0] for _ in range(n)]

for i in range(1,n):

    dp[i] = dp[i-1]+b[i]

dp = dp[::-1]

c = 0

dp2 = [0 for _ in range(n)]

for i in range(n):

    c += a[i]

    dp2[i] = c +dp[i]

print((max(dp2)))
nums = int(eval(input()))
ary = [0, 0]
for i in range(2):
    ary[i] = list(map(int, input().split()))
max = 0
for i in range(nums):
    h = 0
    w = 0
    count = ary[h][w]
    for x in range(nums):
        if i == x:
            h = 1
            count += ary[h][w]
            continue
        w += 1
        count += ary[h][w]
    if count > max:
        max = count
print(max)

n = int(eval(input()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))[::-1]
dp = [b[0] for _ in range(n)]
for i in range(1, n):
    dp[i] = dp[i - 1] + b[i]
dp = dp[::-1]
c = 0
dp2 = [0 for _ in range(n)]
for i in range(n):
    c += a[i]
    dp2[i] = c + dp[i]
print((max(dp2)))

-nums = int(eval(input())) -ary = [0, 0] -for i in range(2): -    ary[i] = list(map(int, input().split())) -max = 0 -for i in range(nums): -    h = 0 -    w = 0 -    count = ary[h][w] -    for x in range(nums): -        if i == x: -            h = 1 -            count += ary[h][w] -            continue -        w += 1 -        count += ary[h][w] -    if count > max: -        max = count -print(max) +n = int(eval(input())) +a = list(map(int, input().split())) +b = list(map(int, input().split()))[::-1] +dp = [b[0] for _ in range(n)] +for i in range(1, n): +    dp[i] = dp[i - 1] + b[i] +dp = dp[::-1] +c = 0 +dp2 = [0 for _ in range(n)] +for i in range(n): +    c += a[i] +    dp2[i] = c + dp[i] +print((max(dp2)))