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.
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 ).
Print the dates in non-decreasing order in the same format as they are given in the input.