import heapq

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

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

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

rs = sorted(list(map(int, input().split())))

apples = ps + qs

heapq.heapify(apples)

m = heapq.heappop(apples)

M = rs.pop()

while 1:

    if m < M:

        heapq.heappush(apples, M)

        if rs: 

            m = heapq.heappop(apples)

            M = rs.pop()

        else:

            break

    else:

        heapq.heappush(apples, m)

        break 

print((sum(apples)))

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

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

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

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

apples = sorted(ps + qs + rs, reverse=True)

print((sum(apples[:x+y])))

import heapq

x, y, a, b, c = list(map(int, input().split()))
ps = sorted(list(map(int, input().split())), reverse=True)[:x]
qs = sorted(list(map(int, input().split())), reverse=True)[:y]
rs = sorted(list(map(int, input().split())))
apples = ps + qs
heapq.heapify(apples)
m = heapq.heappop(apples)
M = rs.pop()
while 1:
    if m < M:
        heapq.heappush(apples, M)
        if rs:
            m = heapq.heappop(apples)
            M = rs.pop()
        else:
            break
    else:
        heapq.heappush(apples, m)
        break
print((sum(apples)))

x, y, a, b, c = list(map(int, input().split()))
ps = sorted(list(map(int, input().split())), reverse=True)[:x]
qs = sorted(list(map(int, input().split())), reverse=True)[:y]
rs = list(map(int, input().split()))
apples = sorted(ps + qs + rs, reverse=True)
print((sum(apples[: x + y])))

-import heapq - -rs = sorted(list(map(int, input().split()))) -apples = ps + qs -heapq.heapify(apples) -m = heapq.heappop(apples) -M = rs.pop() -while 1: -    if m < M: -        heapq.heappush(apples, M) -        if rs: -            m = heapq.heappop(apples) -            M = rs.pop() -        else: -            break -    else: -        heapq.heappush(apples, m) -        break -print((sum(apples))) +rs = list(map(int, input().split())) +apples = sorted(ps + qs + rs, reverse=True) +print((sum(apples[: x + y])))