Problem G: 最年长的人

Problem G: 最年长的人

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

给定 lns="http://www.w3.org/1998/Math/MathML">n 个人的出生日期,请找出其中年龄最大的,并输出他的出生日期。

Input

第一行:单个整数 lns="http://www.w3.org/1998/Math/MathML">n
第二行到第lns="http://www.w3.org/1998/Math/MathML">n+1行:每行格式如下:

  • 首先有一个四位数 lns="http://www.w3.org/1998/Math/MathML">y 表示年份;
  • 接下来有一个两位数 lns="http://www.w3.org/1998/Math/MathML">m 表示月份;
  • 最后有一个两位数 lns="http://www.w3.org/1998/Math/MathML">d 表示日期;
  • 年月日之间以一个减号 - 隔开。
  • 对于 lns="http://www.w3.org/1998/Math/MathML">50%的数据,lns="http://www.w3.org/1998/Math/MathML">1n1,000
  • 对于 lns="http://www.w3.org/1998/Math/MathML">100%的数据,lns="http://www.w3.org/1998/Math/MathML">1n1,000,000
  • lns="http://www.w3.org/1998/Math/MathML">1900y2020
  • 保证月份和日期都是两位数且是合理的日期。



Output

一行字符串:表示最早的出生日期,格式同输入。

Sample Input Copy

4
2008-08-08
1953-06-15
1949-10-01
1926-08-18

Sample Output Copy

1926-08-18