In Flower City, there lived a renowned astronomer named Skelko. He possessed the unique ability to craft magnifying glasses from shards of broken bottles and had built a telescope for himself. Skelko had a strict routine: every night, starting at , he would observe the stars for at least hours minutes. However, he often succumbed to sleep, necessitating multiple observation sessions. On this particular night, he had already ventured out times and recorded the intervals of his observations. Upon waking up for the last time, he resolved to complete his observation quota. Write a program to determine when he can finally return to bed. If he has already observed for the required duration, he can go to bed immediately. All times are provided in the format hh:mm (0 \leq hh \leq 23, 0 \leq mm \leq 59), which must be strictly adhered to, and fall within the range from to the following day.
The program receives the number of previous observations 0 \leq N \leq 8. Following this, lines contain the start and end times of these observations, separated by a space. The final line provides the time of Skelko's last awakening.
The program should output the time Skelko can return to bed in the specified format.
Example 1
Example 2
Test 1. Skelko has already observed for hours minutes, leaving minutes of observation remaining.
Test 2. The observation requirement has already been fulfilled, so he can go to sleep immediately.