Broken Clock
In an electronic clock, a malfunction has occurred. Now, instead of the seconds counter increasing every second, the hours counter increases. When the hours counter overflows (i.e., reaches 24), it resets to 0 and the minutes counter increases. Similarly, when the minutes counter overflows, it resets, and the seconds counter increases. When the seconds counter overflows, it also resets to 0, while the other counters remain at 0. It is known that the malfunction started at h_1 hours m_1 minutes s_1 seconds, at which point the clock was showing the correct time.
Write a program to determine the correct time based on the current readings of the malfunctioning clock.
Input
The first line contains three integers h_1, m_1, s_1, representing the time when the clock malfunctioned. The second line contains three numbers h_2, m_2, s_2, representing the current readings of the clock (0 ≤ h_1, h_2 < 24, 0 ≤ m_1, m_2, s_1, s_2 < 60).
Output
Output a single line with the correct time (i.e., the number of hours, minutes, and seconds) at the moment when the malfunctioning clock shows h_2 hours m_2 minutes s_2 seconds.