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

p=list([['red',int(x)] for x in input().split()])

q=list([['green',int(x)] for x in input().split()])

r=list([['nan',int(x)] for x in input().split()])

p.sort(key=lambda x:x[1])

p=p[-x:]

q.sort(key=lambda x:x[1])

q=q[-y:]

p[len(p):len(p)]=q

p[len(p):len(p)]=r

p.sort(key=lambda x:x[1])

p=p[-x-y:]

print((sum([pi[1] for pi in p])))

  

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

p=p[-x:]

q.sort()

q=q[-y:]

p[len(p):len(p)]=q

p[len(p):len(p)]=r

p.sort()

p=p[-x-y:]

print((sum(p)))
x, y, a, b, c = list(map(int, input().split()))
p = list([["red", int(x)] for x in input().split()])
q = list([["green", int(x)] for x in input().split()])
r = list([["nan", int(x)] for x in input().split()])
p.sort(key=lambda x: x[1])
p = p[-x:]
q.sort(key=lambda x: x[1])
q = q[-y:]
p[len(p) : len(p)] = q
p[len(p) : len(p)] = r
p.sort(key=lambda x: x[1])
p = p[-x - y :]
print((sum([pi[1] for pi in p])))

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()
p = p[-x:]
q.sort()
q = q[-y:]
p[len(p) : len(p)] = q
p[len(p) : len(p)] = r
p.sort()
p = p[-x - y :]
print((sum(p)))

-p = list([["red", int(x)] for x in input().split()]) -q = list([["green", int(x)] for x in input().split()]) -r = list([["nan", int(x)] for x in input().split()]) -p.sort(key=lambda x: x[1]) +p = list(map(int, input().split())) +q = list(map(int, input().split())) +r = list(map(int, input().split())) +p.sort() -q.sort(key=lambda x: x[1]) +q.sort() -p.sort(key=lambda x: x[1]) +p.sort() -print((sum([pi[1] for pi in p]))) +print((sum(p)))