using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace YukiCoder { class Program { static void Main(string[] args) { var la = new List(); for (int i = 0; i < 3; i++) { var va = Console.ReadLine().Split().Select(int.Parse).ToArray(); la.Add((va[0] - 150) << 16 | (100 - va[1]) << 8 | i); } var vb = la.OrderByDescending(a => a).ToList(); vb.ForEach(n => Console.WriteLine((Char)('A' + (n & 0xF)))); Console.ReadLine(); } } }