Problem B
Birthday Boy
Bobby has just joined a new company, and human resources has asked him to note his birthday on the office calendar. Bobby the Birthday Boy wants to feel special! Also, Bobby the Birthday Boy does not mind lying for attention.
He notices that the longer people have not celebrated a birthday or eaten cake, the more they like it when a new one comes around. So he wants to pick his birthday in such a way that the longest period of time without a birthday possible has just passed. Of course he does not want to share his birthday with any colleague, either.
Can you help him make up a fake birthday to make him feel as special as possible? Bobby does not care about leap years: you can assume every year is not a leap year, and that no one has a birthday on the 29th of February. In case of a tie, Bobby decides to fill in the date that is soonest (strictly) after the current date, the 27th of October, because that means he will get to celebrate his birthday as soon as possible.
Input

The first line has a number $1 \leq n \leq 100$, the number of colleagues Bobby has in his new office.

Then follow $n$ lines, each line corresponding to one coworker. Each line gives the name of the colleague (using at most $20$ upper or lowercase letters a–z) separated from their birthday date by a space. The date is in format mmdd.
Output
Print the fake birthday date (format: mmdd) chosen by Bobby.
Sample Input 1  Sample Output 1 

3 Henk 0109 Roos 0920 Pietje 1111 
0919 
Sample Input 2  Sample Output 2 

16 Henk 0109 Luc 1231 Jan 0322 Roos 0920 Pietje 1111 Anne 0228 Pierre 0925 Dan 1215 Lieze 1117 Charlotte 0501 Lenny 0802 Marc 0425 Martha 0612 John 0326 Matthew 0120 John 0120 
0801 
Sample Input 3  Sample Output 3 

3 JohnIII 0429 JohnVI 1028 JohnIIX 0428 
0427 
Sample Input 4  Sample Output 4 

3 CharlesII 0430 CharlesV 1029 CharlesVII 0429 
1028 