def calculate_hand_ranking(hand):
     if StraightFlushVerifier.verify_hand_ranking(hand):
         return StraightFlushCalculator.calculate_hand_ranking(hand)
     else:
         if FourOfAKindVerifier.verify_hand_ranking(hand):
             return FourOfAKindCalculator.calculate_hand_ranking(hand)
         else:
             if FullHouseVerifier.verify_hand_ranking(hand):
                 return FullHouseCalculator.calculate_hand_ranking(hand)
             else:
                 if FlushVerifier.verify_hand_ranking(hand):
                     return FlushCalculator.calculate_hand_ranking(hand)
                 else:
                     if StraightVerifier.verify_hand_ranking(hand):
                         return StraightCalculator.calculate_hand_ranking(hand)
                     else:
                         if ThreeOfAKindVerifier.verify_hand_ranking(hand):
                             return ThreeOfAKindCalculator.calculate_hand_ranking(hand)
                         else:
                             if TwoPairVerifier.verify_hand_ranking(hand):
                                 return TwoPairCalculator.calculate_hand_ranking(hand)
                             else:
                                 if OnePairVerifier.verify_hand_ranking(hand):
                                     return OnePairCalculator.calculate_hand_ranking(hand)
                                 else:
                                     if HighCardVerifier.verify_hand_ranking(hand):
                                         return HighCardCalculator.calculate_hand_ranking(hand)
                                     else:
                                         raise RuntimeError("unknown hand ranking")
 def calculate_hand_ranking(hand):
     if ThreeOfAKindVerifier.verify_hand_ranking(hand):
         three_of_a_kind_value = max(set(hand.cards), key=hand.cards.count).value
         sorted_card_values = sorted([card.value for card in hand.cards if card.value != three_of_a_kind_value], reverse=True)
         first_kicker_value = sorted_card_values[0]
         second_kicker_value = sorted_card_values[1]
         return ThreeOfAKind(
             three_of_a_kind_value,
             first_kicker_value,
             second_kicker_value
         )
     else:
         raise RuntimeError("hand is not three of a kind")