using System; namespace yukicoder { class Program { static void Main(string[] args) { int[] n = new int[10]; int b = 0; int ans = 0; int a = int.Parse(Console.ReadLine()); for (int i = 0; i < a; i++) { string[] s = Console.ReadLine().Split(' '); for (int x = 0; x <=a+1; x++) { if (x <= 3) { b = int.Parse(s[x]); } for (int z = 0; z < 10; z++) { if (s[4] == "NO") { if (b == z) { n[z]--; } }else if (s[4] == "YES") { if (b == z) { n[z]++; } } } } } for (int t = 1; t <= 9; t++) { if (n[ans] <= n[t]) { ans = t; } } Console.WriteLine(ans); } } }