Solution for Average Grades