#K42152. Sort Timestamps
Sort Timestamps
Sort Timestamps
You are given a list of timestamps in the HH:MM:SS
format. Your task is to sort these timestamps in ascending order.
Since the timestamps are provided in a fixed-width format, they can be sorted using lexicographical order. However, careful treatment is expected to correctly handle all edge cases.
Note: All timestamps are in the valid 24-hour format.
The solution is expected to read input from stdin
and output the results to stdout
.
inputFormat
The first line contains an integer n which denotes the number of timestamps. Each of the following n lines contains a timestamp in the HH:MM:SS
format.
outputFormat
Output the sorted timestamps, each on a new line in ascending order.
## sample5
13:45:30
09:15:45
23:59:59
00:00:01
13:45:31
00:00:01
09:15:45
13:45:30
13:45:31
23:59:59
</p>