from typing import Tuple


def get_input() -> Tuple[int, int, list, set, set]:
    """Returns input for challenge "No Idea!

    Returns:
        Tuple[int, int, list, set, set]: n, m, array, A, B
    """
    n, m = (int(x) for x in input().split())
    arr = input().split()
    a = set(input().split())
    b = set(input().split())

    return n, m, arr, a, b