class Solution:
def bestHand(self, ranks: List[int], suits: List[str]) -> str:
if len(set(suits)) == 1:
return "Flush"
cards = Counter(ranks)
is_pair = False
for v in cards.values():
if v >= 3:
return "Three of a Kind"
if v == 2:
is_pair = True
return "Pair" if is_pair else "High Card"