#C13854. Student Score Categorization

    ID: 43438 Type: Default 1000ms 256MiB

Student Score Categorization

Student Score Categorization

You are given records of students with their scores in three subjects. Your task is to categorize each student according to their average score using the following criteria:

  • If \(\frac{s_1+s_2+s_3}{3} \geq 85\), the student is categorized as Excellent.
  • If \(70 \leq \frac{s_1+s_2+s_3}{3} < 85\), the student is categorized as Good.
  • If \(50 \leq \frac{s_1+s_2+s_3}{3} < 70\), the student is categorized as Average.
  • If \(\frac{s_1+s_2+s_3}{3} < 50\), the student is categorized as Poor.

You should read the input from standard input and print the categorized results for each student to standard output in the format:

Name: Category

inputFormat

The first line contains an integer \(n\) representing the number of students. The next \(n\) lines each contain a student's record in the following format: Name Score1 Score2 Score3 where Name is a string (without spaces) and Score1, Score2, Score3 are integers.

outputFormat

For each student, output a single line in the format Name: Category corresponding to the student's name and their computed category. The order of the output should match the order of the input.

## sample
5
John 78 82 89
Sarah 91 85 88
Adam 45 56 52
Nancy 69 72 65
Paul 35 40 30
John: Good

Sarah: Excellent Adam: Average Nancy: Average Paul: Poor

</p>