Problem:
Score : 500 points

Problem Statement

You are going to eat X red apples and Y green apples.

You have A red apples of deliciousness p_1,p_2, \dots, p_A, B green apples of deliciousness q_1,q_2, \dots, q_B, and C colorless apples of deliciousness r_1,r_2, \dots, r_C.

Before eating a colorless apple, you can paint it red or green, and it will count as a red or green apple, respectively.

From the apples above, you will choose the apples to eat while making the sum of the deliciousness of the eaten apples as large as possible.

Find the maximum possible sum of the deliciousness of the eaten apples that can be achieved when optimally coloring zero or more colorless apples.

Constraints

1 \leq X \leq A \leq 10^5

1 \leq Y \leq B \leq 10^5

1 \leq C \leq 10^5

1 \leq p_i \leq 10^9

1 \leq q_i \leq 10^9

1 \leq r_i \leq 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X Y A B C
p_1 p_2 ... p_A
q_1 q_2 ... q_B
r_1 r_2 ... r_C

Output

Print the maximum possible sum of the deliciousness of the eaten apples.

Sample Input 1

1 2 2 2 1
2 4
5 1
3

Sample Output 1

12

The maximum possible sum of the deliciousness of the eaten apples can be achieved as follows:

Eat the 2-nd red apple.

Eat the 1-st green apple.

Paint the 1-st colorless apple green and eat it.

Sample Input 2

2 2 2 2 2
8 6
9 1
2 1

Sample Output 2

25

Sample Input 3

2 2 4 4 4
11 12 13 14
21 22 23 24
1 2 3 4

Sample Output 3

74

Solution in Lua (5.3.2) (judge verdict: Wrong Answer)

local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, '*'..string.sub(k, i, i)) end local r = io.read local u = table.unpack or unpack return function() return r(u(a)) end end})
--read.N = function(N) local t={} for i=1,N do t[i]=read.n() end return t end
string.totable = function(s) local t={} local u=string.sub for i=1,#s do t[i] = u(s, i, i) end return t end
string.split = function(s) local t={} for w in string.gmatch(s, "[^%s]+") do table.insert(t, w) end return (table.unpack or unpack)(t) end
local function array(dimension, default_val) assert(type(default_val) ~= 'table') local n=dimension local m={}if default_val~=nil then m[1]={__index=function()return default_val end}end for i=2,n do m[i]={__index=function(p, k)local c=setmetatable({},m[i-1])rawset(p,k,c)return c end}end return setmetatable({},m[n])end
----
local function readN(N)
    local t={}
    local s = read.l()
    local ins = table.insert
    for w in string.gmatch(s, "[^%s]+") do
        ins(t, tonumber(w))
    end
    return t
end
local X,Y,A,B,C,_ = read.nnnnnl()
local P = readN(A)
local Q = readN(B)
local R = readN(C)
table.sort(P, function(a,b) return a>b end)
table.sort(Q, function(a,b) return a>b end)
table.sort(R, function(a,b) return a>b end)
local t = {}
local sum = 0
local froma = math.min(X, A)
for i=1,froma do
    sum = sum + P[i]
    table.insert(t, {P[i], 'R'})
end
local ptrr = froma
local fromb = math.min(Y, B)
for i=1,fromb do
    sum = sum + Q[i]
    table.insert(t, {Q[i], 'G'})
end
local ptrg = fromb
local lacka = math.max(X-A, 0)
local lackb = math.max(Y-B, 0)
for i=1,lacka+lackb do
    sum = sum + R[i]
    table.insert(t, {R[i], 'W'})
end
assert(#t == X+Y)
local ptrw = lacka + lackb + 1
for i=#t,1,-1 do
    if ptrw > C then
        break
    end
    local val, color = t[i][1], t[i][2]
    --print(i, ptrw, R[ptrw], val, color)
    if color == 'W' then
        -- skip
    elseif color == 'R' then
        if val < R[ptrw] then
            sum = sum - val
            sum = sum + R[ptrw]
            ptrw = ptrw + 1
        end
    elseif color == 'G' then
        if val < R[ptrw] then
            sum = sum - val
            sum = sum + R[ptrw]
            ptrw = ptrw + 1
        end
    end
end
print(sum)