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()))



apples=[]

for i in range(a):

    apples.append([p[i],0])

for i in range(b):

    apples.append([q[i],1])

for i in range(c):

    apples.append([r[i],2])



apples.sort(reverse=True)



mx_cnt=[x,y,float('inf')]

cnt=[0,0,0]

ans=0

for app in apples:

    deli=app[0]

    clr = app[1]



    if cnt[clr] < mx_cnt[clr]:

        ans+=deli

        cnt[clr]+=1



    if sum(cnt)>=x+y:

        break

print(ans)
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)



apples=[]

apples.extend(p[:x])

apples.extend(q[:y])

apples.extend(r)



apples.sort(reverse=True)



print((sum(apples[:x+y])))
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()))
apples = []
for i in range(a):
    apples.append([p[i], 0])
for i in range(b):
    apples.append([q[i], 1])
for i in range(c):
    apples.append([r[i], 2])
apples.sort(reverse=True)
mx_cnt = [x, y, float("inf")]
cnt = [0, 0, 0]
ans = 0
for app in apples:
    deli = app[0]
    clr = app[1]
    if cnt[clr] < mx_cnt[clr]:
        ans += deli
        cnt[clr] += 1
    if sum(cnt) >= x + y:
        break
print(ans)

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

+p.sort(reverse=True) +q.sort(reverse=True) -for i in range(a): -    apples.append([p[i], 0]) -for i in range(b): -    apples.append([q[i], 1]) -for i in range(c): -    apples.append([r[i], 2]) +apples.extend(p[:x]) +apples.extend(q[:y]) +apples.extend(r) -mx_cnt = [x, y, float("inf")] -cnt = [0, 0, 0] -ans = 0 -for app in apples: -    deli = app[0] -    clr = app[1] -    if cnt[clr] < mx_cnt[clr]: -        ans += deli -        cnt[clr] += 1 -    if sum(cnt) >= x + y: -        break -print(ans) +print((sum(apples[: x + y])))