def list_check(listA, listB):
    """
    a = [1, 2, 3]
    b = [4, 5, 6]
    list_check(a, b) == 0
    b = [3, 4, 5]
    list_check(a, b) == 1
    """
    ans = 0
    for A in listA:
        for B in listB:
            if A == B:
                ans = 1
    return ans