Sort the times according to the given criteria.
The first input is the number n~(1 \le n \le 100) which is followed by time moments. Each time moment is given as integer values — hours (from to ), minutes (from to ), and seconds (from to ).
Output the time moments in non-decreasing order (in the format of hours, minutes, and seconds as in the input, without leading zeros).
Example 1