private static void BirthdayCelebrations() { Society society = new Society(); var input = Console.ReadLine(); while (input != "End") { var splitted = input .Split(' ') .ToList(); if (splitted[0] == "Robot") { society.AddInhabitant(new Robot(splitted[1], splitted[2])); } else if (splitted[0] == "Citizen") { society.AddInhabitant(new Citizen(splitted[1], int.Parse(splitted[2]), splitted[3], splitted[4])); society.AddPetOrCitizen(new Citizen(splitted[1], int.Parse(splitted[2]), splitted[3], splitted[4])); } else { society.AddPetOrCitizen(new Pet(splitted[1], splitted[2])); } input = Console.ReadLine(); } var year = Console.ReadLine(); Console.WriteLine(society.GetBurthdatesInYear(year)); }