[Python3] check all candidates
\n\nclass Solution:\n    def maximumGood(self, statements: List[List[int]]) -> int:\n        n = len(statements)\n        ans = 0 \n        for k in range(n, -1
\n```\nclass Solution:\n    def maximumGood(self, statements: List[List[int]]) -> int:\n        n = len(statements)\n        ans = 0 \n        for k in range(n, -1, -1): \n            for good in combinations(list(range(n)), k): \n                cand = True \n                for i in good: \n                    if cand: \n                        for j in range(n): \n                            if i != j and (statements[i][j] == 0 and j in good or statements[i][j] == 1 and j not in good): \n                                cand = False \n                                break \n                if cand: return k\n```
['Python3']