import heapq



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

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

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

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

q=[]

for val in arr1:

  heapq.heappush(q,(-val,1))

for val in arr2:

  heapq.heappush(q,(-val,2))

for val in arr3:

  heapq.heappush(q,(-val,3))

ans=0

cnt1=0

cnt2=0

cnt3=0

while cnt1+cnt2+cnt3<x+y:

  tmp,flag=heapq.heappop(q)

  tmp*=-1

  if flag==1:

    if cnt1<x:

      ans+=tmp

      cnt1+=1

  elif flag==2:

    if cnt2<y:

      ans+=tmp

      cnt2+=1

  elif flag==3:

    ans+=tmp

    cnt3+=1

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

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

arr1=sorted(arr1,reverse=True)

arr1=arr1[:x]

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

arr2=sorted(arr2,reverse=True)

arr2=arr2[:y]

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

ans=arr1+arr2+arr3

ans=sorted(ans,reverse=True)

print((sum(ans[:x+y])))
import heapq

x, y, a, b, c = list(map(int, input().split()))
arr1 = list(map(int, input().split()))
arr2 = list(map(int, input().split()))
arr3 = list(map(int, input().split()))
q = []
for val in arr1:
    heapq.heappush(q, (-val, 1))
for val in arr2:
    heapq.heappush(q, (-val, 2))
for val in arr3:
    heapq.heappush(q, (-val, 3))
ans = 0
cnt1 = 0
cnt2 = 0
cnt3 = 0
while cnt1 + cnt2 + cnt3 < x + y:
    tmp, flag = heapq.heappop(q)
    tmp *= -1
    if flag == 1:
        if cnt1 < x:
            ans += tmp
            cnt1 += 1
    elif flag == 2:
        if cnt2 < y:
            ans += tmp
            cnt2 += 1
    elif flag == 3:
        ans += tmp
        cnt3 += 1
print(ans)

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

-import heapq - +arr1 = sorted(arr1, reverse=True) +arr1 = arr1[:x] +arr2 = sorted(arr2, reverse=True) +arr2 = arr2[:y] -q = [] -for val in arr1: -    heapq.heappush(q, (-val, 1)) -for val in arr2: -    heapq.heappush(q, (-val, 2)) -for val in arr3: -    heapq.heappush(q, (-val, 3)) -ans = 0 -cnt1 = 0 -cnt2 = 0 -cnt3 = 0 -while cnt1 + cnt2 + cnt3 < x + y: -    tmp, flag = heapq.heappop(q) -    tmp *= -1 -    if flag == 1: -        if cnt1 < x: -            ans += tmp -            cnt1 += 1 -    elif flag == 2: -        if cnt2 < y: -            ans += tmp -            cnt2 += 1 -    elif flag == 3: -        ans += tmp -        cnt3 += 1 -print(ans) +ans = arr1 + arr2 + arr3 +ans = sorted(ans, reverse=True) +print((sum(ans[: x + y])))