#C2227. Majority Game Preference
Majority Game Preference
Majority Game Preference
In this problem, you are given the number of friends (m) and their game preferences represented as integers. The mapping is defined as follows: (1) for board games, (2) for card games, and (3) for video games. Your task is to determine which game type is preferred by the majority. More formally, given (m) and an array (P = [p_1, p_2, \dots, p_m]) with (p_i \in {1, 2, 3}), determine the game type with the highest frequency. It is guaranteed that a clear majority exists in each test case.
inputFormat
The input is given via standard input (stdin) and consists of two lines. The first line contains an integer (m), the number of friends. The second line contains (m) space-separated integers representing the game preferences, where each integer is either 1, 2, or 3 corresponding to board games, card games, and video games respectively.
outputFormat
Output a single line to standard output (stdout) containing the preferred game type as a string: "board games", "card games", or "video games".## sample
6
1 1 1 2 3 1
board games
</p>