function Main(input){
	input = input.split("\n");
	var mem = input[0].split(" ").map(Number);
	const arr = new Array(100).fill(0);
	var a = input[1].split(" ").map(Number).sort(function(a,b){return a-b;});
	var b = input[2].split(" ").map(Number).sort(function(a,b){return a-b;});
	var c = input[3].split(" ").map(Number).sort(function(a,b){return a-b;});
	var sum = 0;
	var num = 0;
	while(mem[0]!=0||mem[1]!=0){
		if(a[a.length-1]>b[b.length-1]&&a[a.length-1]>c[c.length-1]&&mem[0]){
			sum += a[a.length-1];
			a.pop();
			mem[0]--;
		}else if(c[c.length-1]>b[b.length-1]){
			sum += c[c.length-1];
			c.pop();
			num++;
		}else{
			sum += b[b.length-1];
			b.pop();
			mem[1]--;
		}
		if(mem[0]==0) a = arr;
		if(mem[1]==0) b = arr;
		if(c.length==0) c = arr;
		if(mem[0]+mem[1]==num) break;
	}
	console.log(sum);
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());