Design a program to determine the winner of a poker game.
The order of a card would be described as "23456789TJQKA", the suit of a card would be described as "HSCD" (Heart, Spade, Club, Diamond). Each card would be presented by two characters, i.e. "9D", "KC" etc.
You would be given a list of hands as a text file, each line represents a player's hand. Your program should output the winning hand (or hands if they are tied.)
The winning rules for hand rankings could be found at: https://www.cardplayer.com/rules-of-poker/hand-rankings. In the event of a tie: Highest card wins, and if necessary, the second-highest, third-highest, fourth-highest and smallest card can be used to break the tie.
Example
input:
6C 7C 8C 9C TC
9D 9H 9S 9C 7D
TD TC TH 7C 7D
output:
6C 7C 8C 9C TC
input:
TD TC TH 7C 7D
TD TC TH 8C 8D
output:
TD TC TH 8C 8D
Your solution would be evaluated from two perspective, correctness and code design. So try your best to organize the code as if this is the code would be read and modified by multiple people in a team.