using System.Linq; using System; public class P { public char n { get; set; } public int h { get; set; } } public class Hello { public static void Main() { var name = new char[] { 'A', 'B', 'C' }; var ps = new P[3]; for (int i = 0; i < 3; i++) ps[i] = new P { n = name[i], h = int.Parse(Console.ReadLine().Trim()) }; foreach (var x in ps.OrderByDescending(y =>y.h)) Console.WriteLine(x.n); } }