class Solution:

    def fairCandySwap(self, A: List[int], B: List[int]) ->List[int]:
        diff = (sum(A) - sum(B)) // 2
        setB = set(B)
        for i in A:
            if i - diff in setB:
                return [i, i - diff]

72d2fc31562d74722b89abad390390bc4e7863c0
<mask token>

class Solution:
    <mask token>

class Solution:

    def fairCandySwap(self, A: List[int], B: List[int]) ->List[int]:
        diff = (sum(A) - sum(B)) // 2
        setB = set(B)
        for i in A:
            if i - diff in setB:
                return [i, i - diff]
