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

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

p.sort()

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

q.sort()

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

r.sort(reverse=True)



i=-X

j=-Y

k=0

deru=0

while deru==0 and k<C and (r[k]>p[i] or r[k]>q[j]):

  if p[i]>q[j] and j<0:

    j+=1

    k+=1

  elif p[i]>q[j] and j>=0 and i<0 and p[i]<r[k]:

    i+=1

    k+=1

  elif p[i]<=q[j] and i<0:

    i+=1

    k+=1

  elif p[i]<=q[j] and i>=0 and j<0 and q[j]<r[k]:

    j+=1

    k+=1

  else:

    deru=1

    

if i==0:

  a=0

else:

  a=sum(p[i:])

  

if j==0:

  b=0

else:

  b=sum(q[j:])

  

if k==0:

  c=0

else:

  c=sum(r[:k])

  

print((a+b+c))
X, Y, A, B, C=list(map(int, input().split()))

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

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

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

p.sort()

q.sort()

nums=p[-X:]+q[-Y:]+r

nums.sort()

print((sum(nums[-(X+Y):])))
X, Y, A, B, C = list(map(int, input().split()))
p = list(map(int, input().split()))
p.sort()
q = list(map(int, input().split()))
q.sort()
r = list(map(int, input().split()))
r.sort(reverse=True)
i = -X
j = -Y
k = 0
deru = 0
while deru == 0 and k < C and (r[k] > p[i] or r[k] > q[j]):
    if p[i] > q[j] and j < 0:
        j += 1
        k += 1
    elif p[i] > q[j] and j >= 0 and i < 0 and p[i] < r[k]:
        i += 1
        k += 1
    elif p[i] <= q[j] and i < 0:
        i += 1
        k += 1
    elif p[i] <= q[j] and i >= 0 and j < 0 and q[j] < r[k]:
        j += 1
        k += 1
    else:
        deru = 1
if i == 0:
    a = 0
else:
    a = sum(p[i:])
if j == 0:
    b = 0
else:
    b = sum(q[j:])
if k == 0:
    c = 0
else:
    c = sum(r[:k])
print((a + b + c))

X, Y, A, B, C = list(map(int, input().split()))
p = list(map(int, input().split()))
q = list(map(int, input().split()))
r = list(map(int, input().split()))
p.sort()
q.sort()
nums = p[-X:] + q[-Y:] + r
nums.sort()
print((sum(nums[-(X + Y) :])))

+q = list(map(int, input().split())) +r = list(map(int, input().split())) -q = list(map(int, input().split())) -r = list(map(int, input().split())) -r.sort(reverse=True) -i = -X -j = -Y -k = 0 -deru = 0 -while deru == 0 and k < C and (r[k] > p[i] or r[k] > q[j]): -    if p[i] > q[j] and j < 0: -        j += 1 -        k += 1 -    elif p[i] > q[j] and j >= 0 and i < 0 and p[i] < r[k]: -        i += 1 -        k += 1 -    elif p[i] <= q[j] and i < 0: -        i += 1 -        k += 1 -    elif p[i] <= q[j] and i >= 0 and j < 0 and q[j] < r[k]: -        j += 1 -        k += 1 -    else: -        deru = 1 -if i == 0: -    a = 0 -else: -    a = sum(p[i:]) -if j == 0: -    b = 0 -else: -    b = sum(q[j:]) -if k == 0: -    c = 0 -else: -    c = sum(r[:k]) -print((a + b + c)) +nums = p[-X:] + q[-Y:] + r +nums.sort() +print((sum(nums[-(X + Y) :])))