One day, TT asked Mr. Cai a question about A + B .But this question is not simple, A, B are represent the time.

A and B are composed of three integers, respectively hours, minutes and seconds, for instance, assume that A is 34 45 56, it means that A is represented by time is 34 hour 45 minutes 56 seconds.

Input data is composed of more than one line, the first is an integer N indicates the number of test case, then N rows of data per line six integer AH, AM, AS, BH, BM, BS, time A and B respectively the corresponding Hours,Minutes and Seconds. Topics to ensure that all data is legitimate.

For each test case, output A + B, each output results by the hours, minutes, seconds Part 3, as well as meet the rules of the time (ie: minutes and seconds range from 0 to 59), each outputper line, and all parts are available on a 32-bit integer