You thought this contest was just an academic exercise, but it appears that the Gaelic curse placed upon you during the World Tour Contest was not broken, and took effect once again. (Or perhaps you didn't manage to break it, in which case you deserve what's coming next.)
You find yourself in some ancient time in the jungles on the Yucatán peninsula, and you meet a bunch of people you believe are Maya. Unfortunately, you do not understand a word of what they are saying to you. Fortunately, body language exists. And so you point at the sky, then at the sun, and make circular motions. They seem to understand that you wish to know the date, and so they draw some lines in the sand, giving you
Input Specification
The first line will contain the integer
Each subsequent line will contain
Output Specification
For each input line, output the date represented by the
Sample Input
2
7 16 6 16 18
12 19 19 17 19
Sample Output
-0031-09-01
2012-12-20
Comments