using System.Collections.Generic;
public string FirstName { get; set; }
public string LastName { get; set; }
public int Number { get; set; }
public string Team { get; set; }
public static class Teams
public const string Blue = "Blue";
public const string Red = "Red";
public IList<Player> GetPlayers(string teamName, IList<Player> players)
.Where(k => k.Team == teamName)
public static void Main()
List<Player> players = new List<Player>()
.ToDictionary(k => k.Key, v => v.ToList());
foreach (var team in teams)
foreach (var player in team.Value.OrderBy(o => o.Number))
Console.WriteLine($"{player.FirstName} {player.LastName} - {player.Team} number {player.Number}");
var lists = new List<IList<Player>>();
foreach (var team in teams)