Rihan has an analog clock with no numbers , or any indicator that can tell what the time is. So he had a plan. Another device he had, which had numbers , was arranged in a clockwise circle, and Rihan placed his watch at the middle. He thought now he could tell the time exactly. But the problem is, the machine rotates counter-clockwise. Rihan therefore found an equation indicating the relationship between clock speed and machine's velocity. The equation is: (here is the velocity of machine and is the velocity of clockwise).
Now, Rihanna wants to create a computer program so that if the time input is given according to the number of indicators of the machine, it will output the correct time. As you're a programmer, can you help Rihan creating a program for him?
- number of testcases
- , , - for each testcase
Constraints
Print the correct time in the format of
It is necessary to print 01 instead of 1. Output should be printed for every testcase separating by a newline.
Input | Output |
---|---|
2 06:30:30 12:00:00 | 06:30:30 12:00:00 |