When programmer Vova visited China, he discovered that European "Aurora" watches were being sold there at a tenth of the price compared to Europe. 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 "Aurora" 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 times slower than the minute hand, and the minute hand moves 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 hours requires 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.
The first line contains a single integer (1 \le n \le 50000) — the number of watches in the batch. The following lines, each line (i+1) of the input, contains the time on the -th watch in the format h:mm:ss, where the integer (1 \le h \le 12) represents hours, and the two-digit integers and (00 \le mm, ss \le 59) represent minutes and seconds, respectively.
Output the time that should be set on all the watches, in the specified format.
Example 1