Sort the time according to the specified criteria.
The first line contains the number . Then times are given. Each time is given as three integers — hours ( to ), minutes ( to ), and seconds (from to ).
Print the times, sorted in nondecreasing order (time is also displayed in the form of three numbers, do not print the leading zeros).