Midhat is a network security engineer based in Sarajevo. In July and August 2013 he is assigned to several important consulting projects around the world, and Ramadhan (the fasting month for Muslims) falls in those two months in 2013. The cities on his itinerary are Istanbul, Kuala Lumpur, Tokyo, Melbourne, Sao Paulo and Chicago. Muslims who are travelling are permitted not to fast, but Midhat prefers to keep fasting through Ramadhan. The one thing that worries him is waking up in time for sahur (the early meal before dawn) on his own, because at home his mother wakes him.
Midhat wants to have his sahur 45 minutes before imsa' (the time by which sahur must end), so he sets his travel alarm clock 45 minutes before imsa'. That way he eats his sahur in time, performs the Fajr prayer and starts work early. Imsa' comes at a different time in every city, so write a program that reads a time stamp in 24-hour notation and prints the time stamp 45 minutes earlier.
24-hour notation starts at 0:00 (midnight) and ends at 23:59 (one minute before midnight). The input and the output drop the leading zeros and the colon to keep things simple, so 0:00 is written as 0 0.
The first line contains the number of test cases T. Each of the next T lines contains a time in 24-hour notation as two integers H and M (0≤H≤23, 0≤M≤59) separated by a single space. H is the hour and M is the minute.
For each test case print one line in the format Case #x: H M, where x is the test case number starting from 1, and H and M are the hour and the minute 45 minutes before the input time. Subtracting 45 minutes can cross midnight. In that case the clock wraps around a full day and you print the time on the previous day. Print the hour and the minute without leading zeros.