#C10796. Majority Suit Determination

    ID: 40040 Type: Default 1000ms 256MiB

Majority Suit Determination

Majority Suit Determination

You are given a set of cards represented by integers from 1 to 52. In a standard deck, the suits are defined as follows: (\text{Hearts}) for cards numbered 1 to 13, (\text{Diamonds}) for cards 14 to 26, (\text{Clubs}) for cards 27 to 39, and (\text{Spades}) for cards 40 to 52. Your task is to determine the majority suit among the given cards. If there is a tie (i.e. more than one suit achieves the maximum count) or if the input list is empty, output "Tie". Otherwise, output the suit that appears most frequently.

inputFormat

The input is provided via standard input. The first line contains a single integer (n), representing the number of cards. If (n > 0), the second line contains (n) space-separated integers representing the card numbers.

outputFormat

Print one of the following strings: (\text{Hearts}), (\text{Diamonds}), (\text{Clubs}), (\text{Spades}), or (\text{Tie}). The output is written to standard output.## sample

6
1 2 3 4 14 15
Hearts

</p>