#K5756. Top Students with High Performance

    ID: 30447 Type: Default 1000ms 256MiB

Top Students with High Performance

Top Students with High Performance

You are given a list of student records. Each record consists of a student's name and a series of grades. A student is considered a top performer if the average of their highest three grades is at least \(90\). Only consider students who have at least three grades. Your task is to determine the names of the students who meet this criterion.

The average is computed as follows:

[ \text{average} = \frac{\text{sum of top three grades}}{3} ]

Output the names of the qualifying students in the same order as they appear in the input. If no student qualifies, output an empty line.

inputFormat

The first line contains an integer \(n\) denoting the number of students. Each of the next \(n\) lines contains a student's record. A record consists of the student's name (a string without spaces), an integer \(k\) denoting the number of grades, followed by \(k\) integers representing the grades.

outputFormat

Output a single line containing the names of the students who meet the criteria, separated by a single space. If no student qualifies, output an empty line.

## sample
4
Alice 3 88 90 92
Bob 4 79 85 94 91
Charlie 3 70 75 80
David 4 91 92 93 96
Alice Bob David

</p>