#C5807. Most Penalized Player

    ID: 49497 Type: Default 1000ms 256MiB

Most Penalized Player

Most Penalized Player

You are given a list of penalty records. Each record contains a player's name, the time at which the violation occurred, and a violation code. Your task is to determine the player with the highest number of penalties. In case of a tie, output the lexicographically smallest name.

Note: If there are multiple players with the same maximum number of penalties, choose the one whose name comes first in lexicographical order.

Formally, let \( N \) be the number of penalty records, and each record is represented as a triple (player_name, violation_time, violation_code). You are to output the player name and his/her penalty count. The solution must read from standard input (stdin) and write to standard output (stdout).

inputFormat

The input starts with an integer \( N \) denoting the number of penalty records. The following \( N \) lines each contain three space-separated strings: player_name, violation_time, and violation_code.

outputFormat

Output a single line with the name of the player who incurred the most penalties and the total number of penalties, separated by a space. If multiple players have the same maximum penalty count, output the lexicographically smallest name.

## sample
1
Alice 00:23 F01
Alice 1