#C1854. Highest Participant Scores

    ID: 45105 Type: Default 1000ms 256MiB

Highest Participant Scores

Highest Participant Scores

In this problem, you are given the scores of different participants in a competition. Each participant's data is provided in one line, starting with their unique ID, followed by the number of solutions they submitted and the scores of each solution. Your task is to determine the highest score for each participant and output it.

The input begins with an integer n representing the number of participants. Then, for each participant, a line is provided that contains the participant ID, the number of solutions m, and m space-separated integers indicating the scores of the solutions.

Your output should display each participant's ID and their highest score on a separate line.

inputFormat

The first line contains an integer n denoting the number of participants. Each of the next n lines contains space-separated integers. The first two integers on each line are the participant ID and the number of solutions m, respectively. This is followed by m integers representing the scores of that participant's solutions.

outputFormat

For each participant, output a line containing the participant's ID and their highest score, separated by a space.

## sample
3
1 2 450 500
2 3 400 350 450
3 1 300
1 500

2 450 3 300

</p>