#K91602. Card Comparison Game

    ID: 38012 Type: Default 1000ms 256MiB

Card Comparison Game

Card Comparison Game

In this problem, you are given two playing cards represented as strings. Each card consists of a rank and a suit (e.g., "8H" for 8 of Hearts, "AC" for Ace of Clubs). The rank order is defined as follows: (2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 < 10 < J < Q < K < A). Your task is to compare the two cards based on their ranks and determine the winner. If the rank of the first card is higher than the second, Player 1 wins; if lower, Player 2 wins; and if equal, the result is a tie.

inputFormat

The input consists of two lines. The first line contains the card of Player 1 and the second line contains the card of Player 2. Each card is represented as a string (for example, "AC" or "10H").

outputFormat

Output a single line string that is one of the following: "Player 1 wins", "Player 2 wins", or "It's a tie", depending on the comparison of the two cards.## sample

AC
4D
Player 1 wins