from collections import deque



N_red_toEat, N_green_toEat, N_red, N_green, N_white = list(map(int, input().split()))



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

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

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



delicious_red.sort(reverse=True)

delicious_green.sort(reverse=True)

delicious_white.sort(reverse=True)



delicious_red = delicious_red[:N_red_toEat]

delicious_green = delicious_green[:N_green_toEat]



Q_red = deque(delicious_red)

Q_green = deque(delicious_green)

Q_white = deque(delicious_white)



summ = 0



for n in range(N_red_toEat + N_green_toEat):

    if (len(Q_red) > 0):

        r_tmp = Q_red.popleft()

    else:

        r_tmp = 0

    

    if (len(Q_green) > 0):

        g_tmp = Q_green.popleft()

    else:

        g_tmp = 0

    

    if (len(Q_white) > 0):

        w_tmp = Q_white.popleft()

    else:

        w_tmp = 0

    

    MAX_tmp = max(r_tmp, g_tmp, w_tmp)

    

    if (MAX_tmp == r_tmp):

        eat = r_tmp

        Q_green.appendleft(g_tmp)

        Q_white.appendleft(w_tmp)

    

    elif (MAX_tmp == g_tmp):

        eat = g_tmp

        Q_red.appendleft(r_tmp)

        Q_white.appendleft(w_tmp)

    

    else:

        eat = w_tmp

        Q_red.appendleft(r_tmp)

        Q_green.appendleft(g_tmp)

    

    summ += eat

    



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



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

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

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



a = sorted(a, reverse=True)[:x]

b = sorted(b, reverse=True)[:y]



al = a + b + c

al.sort(reverse=True)



ans = sum(al[: x + y])



print(ans)
from collections import deque

N_red_toEat, N_green_toEat, N_red, N_green, N_white = list(map(int, input().split()))
delicious_red = list(map(int, input().split()))
delicious_green = list(map(int, input().split()))
delicious_white = list(map(int, input().split()))
delicious_red.sort(reverse=True)
delicious_green.sort(reverse=True)
delicious_white.sort(reverse=True)
delicious_red = delicious_red[:N_red_toEat]
delicious_green = delicious_green[:N_green_toEat]
Q_red = deque(delicious_red)
Q_green = deque(delicious_green)
Q_white = deque(delicious_white)
summ = 0
for n in range(N_red_toEat + N_green_toEat):
    if len(Q_red) > 0:
        r_tmp = Q_red.popleft()
    else:
        r_tmp = 0
    if len(Q_green) > 0:
        g_tmp = Q_green.popleft()
    else:
        g_tmp = 0
    if len(Q_white) > 0:
        w_tmp = Q_white.popleft()
    else:
        w_tmp = 0
    MAX_tmp = max(r_tmp, g_tmp, w_tmp)
    if MAX_tmp == r_tmp:
        eat = r_tmp
        Q_green.appendleft(g_tmp)
        Q_white.appendleft(w_tmp)
    elif MAX_tmp == g_tmp:
        eat = g_tmp
        Q_red.appendleft(r_tmp)
        Q_white.appendleft(w_tmp)
    else:
        eat = w_tmp
        Q_red.appendleft(r_tmp)
        Q_green.appendleft(g_tmp)
    summ += eat
print(summ)

x, y, a, b, c = list(map(int, input().split()))
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))
a = sorted(a, reverse=True)[:x]
b = sorted(b, reverse=True)[:y]
al = a + b + c
al.sort(reverse=True)
ans = sum(al[: x + y])
print(ans)

-from collections import deque - -N_red_toEat, N_green_toEat, N_red, N_green, N_white = list(map(int, input().split())) -delicious_red = list(map(int, input().split())) -delicious_green = list(map(int, input().split())) -delicious_white = list(map(int, input().split())) -delicious_red.sort(reverse=True) -delicious_green.sort(reverse=True) -delicious_white.sort(reverse=True) -delicious_red = delicious_red[:N_red_toEat] -delicious_green = delicious_green[:N_green_toEat] -Q_red = deque(delicious_red) -Q_green = deque(delicious_green) -Q_white = deque(delicious_white) -summ = 0 -for n in range(N_red_toEat + N_green_toEat): -    if len(Q_red) > 0: -        r_tmp = Q_red.popleft() -    else: -        r_tmp = 0 -    if len(Q_green) > 0: -        g_tmp = Q_green.popleft() -    else: -        g_tmp = 0 -    if len(Q_white) > 0: -        w_tmp = Q_white.popleft() -    else: -        w_tmp = 0 -    MAX_tmp = max(r_tmp, g_tmp, w_tmp) -    if MAX_tmp == r_tmp: -        eat = r_tmp -        Q_green.appendleft(g_tmp) -        Q_white.appendleft(w_tmp) -    elif MAX_tmp == g_tmp: -        eat = g_tmp -        Q_red.appendleft(r_tmp) -        Q_white.appendleft(w_tmp) -    else: -        eat = w_tmp -        Q_red.appendleft(r_tmp) -        Q_green.appendleft(g_tmp) -    summ += eat -print(summ) +x, y, a, b, c = list(map(int, input().split())) +a = list(map(int, input().split())) +b = list(map(int, input().split())) +c = list(map(int, input().split())) +a = sorted(a, reverse=True)[:x] +b = sorted(b, reverse=True)[:y] +al = a + b + c +al.sort(reverse=True) +ans = sum(al[: x + y]) +print(ans)