import heapq

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(reverse=True)

q.sort(reverse=True)

r.sort(reverse=True)

p=p[:x]

q=q[:y]

heapq.heapify(p)

heapq.heapify(q)

for i in range(c):

  pp=heapq.heappop(p)

  pq=heapq.heappop(q)

  if pp<r[i] and pq>=r[i]:

    heapq.heappush(p,r[i])

    heapq.heappush(q,pq)

  elif pp>=r[i] and pq<r[i]:

    heapq.heappush(q,r[i])

    heapq.heappush(p,pp)

  elif pp<r[i] and pq<r[i]:

    if r[i]-pp>=r[i]-pq:

      heapq.heappush(p,r[i])

      heapq.heappush(q,pq)

    else:

      heapq.heappush(q,r[i])

      heapq.heappush(p,pp)

  else:

    heapq.heappush(q,pq)

    heapq.heappush(p,pp)

print((sum(p)+sum(q)))
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(reverse=True)

q.sort(reverse=True)

lis=p[:x]+q[:y]+r

lis.sort(reverse=True)

ans=0

for i in range(x+y):

  ans+=lis[i]

print(ans)

import heapq

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(reverse=True)
q.sort(reverse=True)
r.sort(reverse=True)
p = p[:x]
q = q[:y]
heapq.heapify(p)
heapq.heapify(q)
for i in range(c):
    pp = heapq.heappop(p)
    pq = heapq.heappop(q)
    if pp < r[i] and pq >= r[i]:
        heapq.heappush(p, r[i])
        heapq.heappush(q, pq)
    elif pp >= r[i] and pq < r[i]:
        heapq.heappush(q, r[i])
        heapq.heappush(p, pp)
    elif pp < r[i] and pq < r[i]:
        if r[i] - pp >= r[i] - pq:
            heapq.heappush(p, r[i])
            heapq.heappush(q, pq)
        else:
            heapq.heappush(q, r[i])
            heapq.heappush(p, pp)
    else:
        heapq.heappush(q, pq)
        heapq.heappush(p, pp)
print((sum(p) + sum(q)))

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(reverse=True)
q.sort(reverse=True)
lis = p[:x] + q[:y] + r
lis.sort(reverse=True)
ans = 0
for i in range(x + y):
    ans += lis[i]
print(ans)

-import heapq - -r.sort(reverse=True) -p = p[:x] -q = q[:y] -heapq.heapify(p) -heapq.heapify(q) -for i in range(c): -    pp = heapq.heappop(p) -    pq = heapq.heappop(q) -    if pp < r[i] and pq >= r[i]: -        heapq.heappush(p, r[i]) -        heapq.heappush(q, pq) -    elif pp >= r[i] and pq < r[i]: -        heapq.heappush(q, r[i]) -        heapq.heappush(p, pp) -    elif pp < r[i] and pq < r[i]: -        if r[i] - pp >= r[i] - pq: -            heapq.heappush(p, r[i]) -            heapq.heappush(q, pq) -        else: -            heapq.heappush(q, r[i]) -            heapq.heappush(p, pp) -    else: -        heapq.heappush(q, pq) -        heapq.heappush(p, pp) -print((sum(p) + sum(q))) +lis = p[:x] + q[:y] + r +lis.sort(reverse=True) +ans = 0 +for i in range(x + y): +    ans += lis[i] +print(ans)