Francis Folk was a prominent programmer. His skills in computing had led him to earn large amounts of money. Not knowing what to do with his fortune, he started at a young age to spend it on cars that he collected in various garages across Europe and North America.
Upon his death, his only daughter will inherit his entire fortune, with one condition: she must give one of his cars, whichever she chooses, to Johnny Deutsch, his arch-nemesis.
Of course, Francis's daughter will not let her pride prevent her from inheriting the fruits of her father's life, so she wants to give Johnny the worst car he has, but she doesn't understand cars. Her best friend has suggested that she give him the oldest one.
Francis started buying cars when he turned 18 in 2001, and he always bought new cars and registered them in Spain, where the license plates consisted of four digits followed by three letters (the letters take precedence over the numbers; for example, the plate 9999BBB is older than the plate 0000ZZZ).
Francis has prepared a list of all the license plates of his vehicles; can you tell him which one is the oldest?
A number n followed by n lines, each containing a sequence of 4 digits and 3 letters.
The oldest license plate.
$$$1 \leq n \leq 10000$$$
There are 4 test files; each is worth 25 points.
6 2839PFF 5975HPP 1558PFT 5624FSD 8367RSH 8700LJT
5624FSD