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]



pq = p+q

pq.sort(reverse=True)



pqr = pq + r

pqr.sort(reverse=True)



yamm = 0

for i in range(x+y):

    yamm += pqr[i]



print(yamm)
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]



pq = p+q

pq.sort(reverse=True)



pqr = pq + r

pqr.sort(reverse=True)



yamm = sum(pqr[:x+y])

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

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]
pq = p + q
pq.sort(reverse=True)
pqr = pq + r
pqr.sort(reverse=True)
yamm = sum(pqr[: x + y])
print(yamm)

-yamm = 0 -for i in range(x + y): -    yamm += pqr[i] +yamm = sum(pqr[: x + y])