X, Y, A, B, C = list(map(int, input().split()))

 

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

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

r = sorted(list(map(int,input().split())), reverse=True)

 

colored_p = []

colored_q = []

 

for i in r:

    p_min = p[len(p) - 1] if len(p) > 0 else colored_p[len(colored_p) - 1]

    q_min = q[len(q) - 1] if len(q) > 0 else colored_q[len(colored_q) - 1]

 

    if p_min > i and q_min > i:

        break

 

    p_min_diff = i - p_min

    q_min_diff = i - q_min

 

    if p_min_diff >= q_min_diff and p_min_diff > 0:

        if len(p) > 0:

            p.pop()

        colored_p.append(i)

    elif q_min_diff >= p_min_diff and q_min_diff > 0:

        if len(q) > 0:

            q.pop()

        colored_q.append(i)

 

print((sum(p) + sum(q) + sum(colored_p) + sum(colored_q)))
from collections import deque



X, Y, A, B, C = list(map(int, input().split()))

 

p = deque(sorted(list(map(int,input().split())))[-X:])

q = deque(sorted(list(map(int,input().split())))[-Y:])

r = sorted(list(map(int,input().split())), reverse=True)

 

for i in r:

    p_min = p[0]

    q_min = q[0]

 

    if p_min > i and q_min > i:

        break

 

    p_min_diff = i - p_min

    q_min_diff = i - q_min

 

    if p_min_diff >= q_min_diff and p_min_diff > 0:

        p.popleft()

        p.append(i)

    elif q_min_diff >= p_min_diff and q_min_diff > 0:

        q.popleft()

        q.append(i)

 

print((sum(p) + sum(q)))
X, Y, A, B, C = list(map(int, input().split()))
p = sorted(list(map(int, input().split())), reverse=True)[:X]
q = sorted(list(map(int, input().split())), reverse=True)[:Y]
r = sorted(list(map(int, input().split())), reverse=True)
colored_p = []
colored_q = []
for i in r:
    p_min = p[len(p) - 1] if len(p) > 0 else colored_p[len(colored_p) - 1]
    q_min = q[len(q) - 1] if len(q) > 0 else colored_q[len(colored_q) - 1]
    if p_min > i and q_min > i:
        break
    p_min_diff = i - p_min
    q_min_diff = i - q_min
    if p_min_diff >= q_min_diff and p_min_diff > 0:
        if len(p) > 0:
            p.pop()
        colored_p.append(i)
    elif q_min_diff >= p_min_diff and q_min_diff > 0:
        if len(q) > 0:
            q.pop()
        colored_q.append(i)
print((sum(p) + sum(q) + sum(colored_p) + sum(colored_q)))

from collections import deque

X, Y, A, B, C = list(map(int, input().split()))
p = deque(sorted(list(map(int, input().split())))[-X:])
q = deque(sorted(list(map(int, input().split())))[-Y:])
r = sorted(list(map(int, input().split())), reverse=True)
for i in r:
    p_min = p[0]
    q_min = q[0]
    if p_min > i and q_min > i:
        break
    p_min_diff = i - p_min
    q_min_diff = i - q_min
    if p_min_diff >= q_min_diff and p_min_diff > 0:
        p.popleft()
        p.append(i)
    elif q_min_diff >= p_min_diff and q_min_diff > 0:
        q.popleft()
        q.append(i)
print((sum(p) + sum(q)))

+from collections import deque + -p = sorted(list(map(int, input().split())), reverse=True)[:X] -q = sorted(list(map(int, input().split())), reverse=True)[:Y] +p = deque(sorted(list(map(int, input().split())))[-X:]) +q = deque(sorted(list(map(int, input().split())))[-Y:]) -colored_p = [] -colored_q = [] -    p_min = p[len(p) - 1] if len(p) > 0 else colored_p[len(colored_p) - 1] -    q_min = q[len(q) - 1] if len(q) > 0 else colored_q[len(colored_q) - 1] +    p_min = p[0] +    q_min = q[0] -        if len(p) > 0: -            p.pop() -        colored_p.append(i) +        p.popleft() +        p.append(i) -        if len(q) > 0: -            q.pop() -        colored_q.append(i) -print((sum(p) + sum(q) + sum(colored_p) + sum(colored_q))) +        q.popleft() +        q.append(i) +print((sum(p) + sum(q)))