Chinese clock
When programmer Vova visited China, he discovered that Russian "Zarya" watches were being sold there at a tenth of the price compared to Russia. Seeing an opportunity for profit, Vova purchased a large batch with the intention of selling them back home at half the usual price (effectively five times the price he paid). However, upon returning, he found that many of the watches were not keeping time accurately, and even the slightest movement could stop or start them. It was clear these were not genuine "Zarya" watches, but rather precise replicas. To expedite the sale of the entire batch, Vova plans to set all the watches to the same time. This way, it won't matter if the time is correct—he can claim it's the local time of the manufacturing plant. Before opening the case, he intends to simply shake the suitcase to start all the watches simultaneously.
To adjust the time on the watches, there is a winding crown that allows quick rotation of the hands: the hour hand moves 12 times slower than the minute hand, and the minute hand moves 60 times slower than the second hand. One full turn of the winding crown rotates the second hand by a complete circle, and although such a turn takes only one second, adjusting the time by 6 hours requires 6 minutes. The winding crown and hands can only be turned clockwise to prevent damage to the delicate watch mechanism. Help Vova minimize the effort in preparing the watches for sale by determining the optimal time to set on all of them.
Input
The first line contains a single integer n (1 ≤ n ≤ 50000) — the number of watches in the batch. The following n lines, each line (i+1) of the input, contains the time on the i-th watch in the format h:mm:ss, where the integer h (1 ≤ h ≤ 12) represents hours, and the two-digit integers mm and ss (00 ≤ mm, ss ≤ 59) represent minutes and seconds, respectively.
Output
Output the time that should be set on all the watches, in the specified format.