Practice on Toph

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

Calendar of Planet Biku

By Riaz_BSMRSTU · Limits 1s, 512 MB

Mr. Hikiko is the emperor of a planet called Biku. He got a gift from planet earth which can count time in seconds. Now he wants to make a system which can convert seconds to a time & date format. His idea is to make one like planet earth but a bit simpler. He wants that a month will be exactly 30 days and a year will be 12 months which is 360 days. And the time format will be 12-hour formats. Year counting will be start with year 1 and so on.

Now, Mr. Hikiko hired the best programmer of his planet to do this task. But, this task is still too hard for him. He wants your help. Help him.

Input

Input start with an integer T (1 ≤ T ≤ 105), number of test cases.
Each case will contain a number N (0 ≤ N ≤ 1018), the number of seconds passed on planet Biku.

Output

For each case print the time & date for that second in Day/Month/Year Hour:Minute:Second XM format. You don't have to print any extra digit. See sample case to be more clear.

Sample

InputOutput
3
3600
3858
36112014
1/1/1 1:0:0 AM
1/1/1 1:4:18 AM
28/2/2 11:6:54 PM

    Discussion

    Statistics


    57% Solution Ratio

    AbuBokorEarliest, 4w ago

    RamprosadGFastest, 0.0s

    AbuBokorLightest, 2.9 MB

    chinmoy.bppiShortest, 404B

    Submit

    Login to submit