import heapq



x, y, a, b, c = list(map(int, input().split()))

pp = list([(-int(x), 1) for x in input().split()])

qq = list([(-int(x), 2) for x in input().split()])

rr = list([(-int(x), 3) for x in input().split()])



xx = pp + qq + rr

heapq.heapify(xx)

t = x + y

ans = 0

for _ in range(t):

    while len(xx) > 0:

        v = heapq.heappop(xx)

        if v[1] == 1 and x <= 0:

            continue

        if v[1] == 2 and y <= 0:

            continue

        break



    if v[1] == 1:

        x -= 1

    if v[1] == 2:

        y -= 1

    ans += v[0]



print((-ans))

x, y, a, b, c = list(map(int, input().split()))

pp = list(sorted(map(int, input().split()), reverse=True))[:x]

qq = list(sorted(map(int, input().split()), reverse=True))[:y]

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



xx = list(sorted(pp + qq + rr, reverse=True))[:x+y]

print((sum(xx)))

import heapq

x, y, a, b, c = list(map(int, input().split()))
pp = list([(-int(x), 1) for x in input().split()])
qq = list([(-int(x), 2) for x in input().split()])
rr = list([(-int(x), 3) for x in input().split()])
xx = pp + qq + rr
heapq.heapify(xx)
t = x + y
ans = 0
for _ in range(t):
    while len(xx) > 0:
        v = heapq.heappop(xx)
        if v[1] == 1 and x <= 0:
            continue
        if v[1] == 2 and y <= 0:
            continue
        break
    if v[1] == 1:
        x -= 1
    if v[1] == 2:
        y -= 1
    ans += v[0]
print((-ans))

x, y, a, b, c = list(map(int, input().split()))
pp = list(sorted(map(int, input().split()), reverse=True))[:x]
qq = list(sorted(map(int, input().split()), reverse=True))[:y]
rr = list(map(int, input().split()))
xx = list(sorted(pp + qq + rr, reverse=True))[: x + y]
print((sum(xx)))

-import heapq - -pp = list([(-int(x), 1) for x in input().split()]) -qq = list([(-int(x), 2) for x in input().split()]) -rr = list([(-int(x), 3) for x in input().split()]) -xx = pp + qq + rr -heapq.heapify(xx) -t = x + y -ans = 0 -for _ in range(t): -    while len(xx) > 0: -        v = heapq.heappop(xx) -        if v[1] == 1 and x <= 0: -            continue -        if v[1] == 2 and y <= 0: -            continue -        break -    if v[1] == 1: -        x -= 1 -    if v[1] == 2: -        y -= 1 -    ans += v[0] -print((-ans)) +pp = list(sorted(map(int, input().split()), reverse=True))[:x] +qq = list(sorted(map(int, input().split()), reverse=True))[:y] +rr = list(map(int, input().split())) +xx = list(sorted(pp + qq + rr, reverse=True))[: x + y] +print((sum(xx)))