using System.Collections.Generic;
public static void Main()
var school = new Dictionary<int, string[]> {
[6] = new string[] { "Amy", "Charlie", "Daron" },
[7] = new string[] { "Raul", "Jun", "Chris" },
[8] = new string[] { "Yvonne", "Theo", "Carla" }
IEnumerable<string> AllStudents()
foreach ( var (grade, students) in school)
foreach (var student in students)
foreach (var student in AllStudents())
Console.WriteLine(student);