import sys

input = sys.stdin.buffer.readline

import heapq



def main():

    X,Y,A,B,C = list(map(int,input().split()))

    p = list(map(int,input().split()))

    q = list(map(int,input().split()))

    r = list(map(int,input().split()))

    p.sort()

    q.sort()

    r.sort()

    p = p[-X:]

    q = q[-Y:]

    r = r[-X-Y:]

    use = p+q

    heapq.heapify(use)

    heapq.heapify(r)

    while len(r)>0:

        unt = heapq.heappop(use)

        nc = heapq.heappop(r)

        if nc > unt:

            heapq.heappush(use,nc)

        else:

            heapq.heappush(use,unt)



    print((sum(use)))

    

if __name__ == "__main__":

    main()

import sys

input = sys.stdin.buffer.readline



def main():

    X,Y,A,B,C = list(map(int,input().split()))

    p = list(map(int,input().split()))

    q = list(map(int,input().split()))

    r = list(map(int,input().split()))

    p.sort()

    q.sort()

    r.sort()

    p = p[-X:]

    q = q[-Y:]

    use = p+q+r

    use.sort(reverse=True)

    print((sum(use[:X+Y])))



if __name__ == "__main__":

    main()

import sys

input = sys.stdin.buffer.readline
import heapq


def main():
    X, Y, A, B, C = list(map(int, input().split()))
    p = list(map(int, input().split()))
    q = list(map(int, input().split()))
    r = list(map(int, input().split()))
    p.sort()
    q.sort()
    r.sort()
    p = p[-X:]
    q = q[-Y:]
    r = r[-X - Y :]
    use = p + q
    heapq.heapify(use)
    heapq.heapify(r)
    while len(r) > 0:
        unt = heapq.heappop(use)
        nc = heapq.heappop(r)
        if nc > unt:
            heapq.heappush(use, nc)
        else:
            heapq.heappush(use, unt)
    print((sum(use)))


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.buffer.readline


def main():
    X, Y, A, B, C = list(map(int, input().split()))
    p = list(map(int, input().split()))
    q = list(map(int, input().split()))
    r = list(map(int, input().split()))
    p.sort()
    q.sort()
    r.sort()
    p = p[-X:]
    q = q[-Y:]
    use = p + q + r
    use.sort(reverse=True)
    print((sum(use[: X + Y])))


if __name__ == "__main__":
    main()

-import heapq -    r = r[-X - Y :] -    use = p + q -    heapq.heapify(use) -    heapq.heapify(r) -    while len(r) > 0: -        unt = heapq.heappop(use) -        nc = heapq.heappop(r) -        if nc > unt: -            heapq.heappush(use, nc) -        else: -            heapq.heappush(use, unt) -    print((sum(use))) +    use = p + q + r +    use.sort(reverse=True) +    print((sum(use[: X + Y])))