static TextWriter tw; //= new StreamReader("A-small-attempt3.in");

        #endregion Fields

        #region Methods

        static void Main(string[] args)
        {
            tr = new StreamReader("C-large-1.in");

            int n = Convert.ToInt16(tr.ReadLine());
            List<TestCase> testCases = new List<TestCase>();

            for (; i < n; i++)
            {
                TestCase t = new TestCase();
                string[] temp2 = tr.ReadLine().Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                //string[] temp2 = temp.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                t.lowLimit = Convert.ToInt64(temp2[0]);
                t.upperLimit = Convert.ToInt64(temp2[1]);
                testCases.Add(t.processInput());

            }
            tw = new StreamWriter("output.txt");
            i = 0;
            for (; i < testCases.Count-1; i++)
            {
                tw.WriteLine("Case #{0}: {1}", (i + 1), testCases[i].output);
            }
            tw.Write("Case #{0}: {1}", (i + 1), testCases[i].output);
            tr.Close();
            tw.Close();
            //Console.ReadLine();
        }