local x,y,a,b,c=io.read("n","n","n","n","n")
local t={}
for i=1,a do
    table.insert(t,{io.read("n"),"a"})
end
for i=1,b do
    table.insert(t,{io.read("n"),"b"})
end
for i=1,c do
    table.insert(t,{io.read("n"),"c"})
end
table.sort(t,function(a,b)
    return a[1]<b[1]
end)

local max=0
local aounter=0
local bounter=0
local counter=0
for i=a+b+c,1,-1 do
    if aounter<x and t[i][2]=="a" then
        aounter=aounter+1
        max=max+t[i][1]
    end
    if bounter<y and t[i][2]=="b" then
        bounter=bounter+1
        max=max+t[i][1]
    end
    if aounter+bounter+counter<x+y and t[i][2]=="c" then
        counter=counter+1
        max=max+t[i][1]
    end
    if aounter+bounter+counter==x+y or aounter+bounter==x+y then
        break
    end
end
print(string.format("%d",max))