Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

What Is the Time???

Limits 1s, 512 MB

Rihan has an analog clock with no numbers 1,2, …, 12, or any indicator that can tell what the time is. So he had a plan. Another device he had, which had numbers 1,2, …, 12, 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: 2M-3C =0 (here M = velocity of machine and C = 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?

Input

T (Number of testcase)

HH:MM:SS (HH=hours, MM=minutes, SS=seconds)-> For each testcase.

Constraints:

1<=T<=100

1<=HH<=12

0<=MM<=59

0<=SS<=59

Output

Simply print the correct time in the format of HH:MM:SS

It is necessary to print 01 instead of 1. Output should be printed for every testcase separating by a newline.

For more clearification see sample testcase.

Sample

InputOutput
2
06:30:30
12:00:00
06:30:30
12:00:00

Problem Setter: Md. Masud Mazumder


    Discussion
    Statistics

    31% Solution Ratio

    khayadeEarliest, 3M ago

    khayadeFastest, 0.0s

    TaosifLightest, 0 B

    royantar0311Shortest, 242B

    Submit

    Login to submit