#K51047. Sorting Timestamps

    ID: 29000 Type: Default 1000ms 256MiB

Sorting Timestamps

Sorting Timestamps

You are given a list of timestamp strings in the format (yyyy-mm-dd\ hh:mm:ss). Your task is to sort these timestamps in ascending order. The timestamps are given in a standard ISO-like format so that lexicographical order corresponds to chronological order. Please output the sorted timestamps on a single line, separated by a single space.

inputFormat

The first line of input contains a single integer (n) which is the number of timestamps. The following (n) lines each contain a timestamp string in the format (yyyy-mm-dd\ hh:mm:ss).

outputFormat

Output a single line containing the (n) sorted timestamp strings, separated by a single space.## sample

3
2022-09-15 12:45:30
2021-06-10 03:15:45
2023-01-01 00:00:00
2021-06-10 03:15:45 2022-09-15 12:45:30 2023-01-01 00:00:00