public class Program { public static void Main() { //int num = int.Parse(Console.ReadLine() ?? string.Empty); //string[] str = (Console.ReadLine() ?? string.Empty).Trim().Split(' '); string str = Console.ReadLine() ?? string.Empty; string str2 = Console.ReadLine() ?? string.Empty; string str3 = Console.ReadLine() ?? string.Empty; string ss = str+str2 + str3; int count = 0; while(ss.Length > 0) { if (ss.IndexOf('R') == 0) { count++; ss = ss.Remove(0, 3); } else { ss = ss.Remove(0, 4); count--; } } if(count > 0) { Console.WriteLine("RED"); } else { Console.WriteLine("BLUE"); } } }