시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 512 MB 21 12 12 80.000%

문제

One of the problems in dates processing is that there are several formats of writing down dates.

Peter has the task to write a program that processes an array of texts. Some of them have Russian and European format "day.month.year", while others use American format --- "month/day/year".

Here, year is a number from 1 to 9999, which may contain leading zeroes to get 2, 3 or 4 digits, month --- number from 1 to 12, which may contain leading zero to get 2 digits, day --- number from 1 to 31, which may contain leading zeros to get 2 digits. Dates can be incorrect (for example there can be "Since 2001 isn't a leap year, that's why 29.02.2001 --- incorrect date").

You've got an array of Peters' strings, which correspond to dates. Print each date in two formats: first as "DD.MM.YYYY', second as "MM/DD/YYYY".

입력

The first line of input contains one integer $n$ ($1 \le n \le 20\,000$).

Each of the following $n$ lines contain one date in format "day.month.year" or "month/day/year".

출력

Print $n$ lines. Each line should contain the date in two formats: first as "DD.MM.YYYY", second as "MM/DD/YYYY".

예제 입력 1

2
11.12.2000
1.2.1

예제 출력 1

11.12.2000 12/11/2000
01.02.0001 02/01/0001

예제 입력 2

2
20.10.2100
1/29/3000

예제 출력 2

20.10.2100 10/20/2100
29.01.3000 01/29/3000