Sort the dates
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Sort the dates according to the following criteria:
in non-decreasing order of years;
if the dates have the same year, then sort them in non-decreasing order of months;
if the dates have the same year and month, then sort them in non-decreasing order of days.
Input
The first line contains the number of dates . Each of the following lines contains a date in the format day.month.year. Each date is specified with three integers — day (from to ), month (from to ) and year (from to ).
Output
Print the dates in non-decreasing order in the same format as they are given in the input.
Examples
Input #1
Answer #1
Submissions 380
Acceptance rate 59%