"""
Exercise 1: Find the Town Judge (LeetCode 997)

n people; trust[i] = [a, b] means a trusts b. The judge trusts nobody and is
trusted by everyone else. Return the judge's label (1..n) or -1.
Hint: track in-degree minus out-degree; the judge has n - 1.
"""

def find_judge(n, trust):
    # TODO
    return -1


# --- self-check: do not modify below this line ---
a, b, c = find_judge(2, [[1, 2]]), find_judge(3, [[1, 3], [2, 3], [3, 1]]), find_judge(1, [])
print(a, b, c)
print("PASS" if (a, b, c) == (2, -1, 1) else "FAIL")
