open System

let readInts () = stdin.ReadLine().Split(' ') |> Array.map int64

[<EntryPoint>]
let main argv =
    let xy = readInts()
    let x, y = xy.[0], xy.[1]
    let p = readInts() |> Array.sortDescending |> Array.take (int x)
    let q = readInts() |> Array.sortDescending |> Array.take (int y)
    let r = readInts()
    Array.concat [|p;q;r|] |> Array.sortDescending |> Array.take (int (x+y)) |> Array.sum
    |> printfn "%d"
    0
