import std.stdio,std.conv,std.string,std.algorithm,std.range;
 
void main(){
    auto inp=readln.chomp.split.to!(ulong[]);
    auto x=inp[0];
    auto y=inp[1];
    auto p=readln.chomp.split.to!(ulong[]);
    auto q=readln.chomp.split.to!(ulong[]);
    auto r=readln.chomp.split.to!(ulong[]);
    sort(p);
    sort(q);
    sort(r);
    auto red=x>0?p[$-x..$]:[];
    auto green=y>0?q[$-y..$]:[];
    bool flag;
    while(true){
        flag=false;
        if(r.length==0)
            break;
        else{
            if(red[0]>green[0]){
                if(green[0]<=r[$-1]){
                    green=green[1..$]~r[$-1];
                    r=r[0..$-1];
                    flag=true;
                }
            }else{
                if(red[0]<=r[$-1]){
                    red=red[1..$]~r[$-1];
                    r=r[0..$-1];
                    flag=true;
                }
            }
        }
        if(!flag)
            break;
    } 
      (red.sum+green.sum).writeln;
}

auto sum(ulong[] arr){
    ulong s;
    foreach(e;arr)
        s+=e;
    return s;
}