| 2019-2020 ICPC, Moscow Subregional |
|---|
| Закончено |
Joyful Computer Painting Contest (JCPC) is the world biggest painting competition and is extremely popular in Byteland. To make it easier for newbies to join the community, Jeff has created a new registration system.
Krans is responsible for registering participants of JCPC for regional contest in Default City of Byteland and he finds it inconvenient to enter the dates of birth using the interface provided. In this problem you will help him automate this process by implementing the part of the script that enters dates from raw data.
The registration system interface to enter date of birth looks as follows:
At every moment of time there is exactly one currently selected year between 1900 and 2100, and exactly one currently selected month. There are twelve months as usual, with January being the first month and December being the last month. There can be a selection at some day of current month of current year, or there can be no selection of day at all.
There are three types of actions you can make: change selected year, change selected month and select some day.
To change the selected year you can click on it and scroll down to increase selected year, or scroll up to decrease year. If the selected year already matches the one you need the script should do nothing. It is not possible to scroll up to values below 1900 or scroll down to values above 2100. Every time you change the current year, the current month remains the same but the selection of day (if it was set) disappears.
To change the selected month you can click on the button placed to the left of the month's name to decrease it (go into direction of January) or click on the button placed on the right of the month's name to increase it (go into direction of December). Clicking left if the current month is January or clicking right if the current month is December has no effect. Every time you change the current month, the current year remains the same but the selection of day (if it was set) disappears.
To select the day (or to change the selection of day), you must click the corresponding cell in a week-aligned matrix, consisting of 4, 5 or 6 rows and 7 columns. Rows correspond to weeks that have any of their days in this month (weeks can be complete or incomplete), and columns correspond to days of week. Note that in Jeff's calendar every week starts on Sunday and ends on Saturday.
For example, as you can see on the picture above, if the current month has 31 day and first day of the month is Tuesday, then first day of the month is placed at the third cell of the first row, while last day of the month is at the fifth cell of the fifth row.
You are to help $$$t$$$ participants register in the system. For each of them you are given the currently selected date and hir date of birth. Your task is to check whether this date is correct, i.e. this day actually existed, and, if so, print the sequence of actions that changes the current day to the given date of birth.
Keep in mind that some years are leap, i.e. contain an additional 29-th day in February. The year is leap if it is divisible by 400, or is divisible by 4 and not divisible by 100. For example, years 1984 and 2000 are leap, while years 1990 and 2100 are not.
The first line of the input contains one integer $$$t$$$ ($$$1 \leq t \leq 100\,000$$$) — the number of users to process. Then follow $$$t$$$ user's descriptions.
The first line of a user description contains three integers $$$d_c$$$, $$$m_c$$$ and $$$y_c$$$ ($$$1 \le d_c \le 31$$$, $$$1 \le m_c \le 12$$$, $$$1900 \le y_c \le 2100$$$ — current value of the day, month and year selected in the field. It is guaranteed that this field corresponds to a correct date, i.e. such day exists. The second line of the description contains three integers $$$d_n$$$, $$$m_n$$$ and $$$y_n$$$ ($$$1 \le d_n \le 31$$$, $$$1 \le m_n \le 12$$$, $$$1900 \le y_n \le 2100$$$ — values of the day, month and year user wants to input in the registration system.
It is guaranteed that the requested date differs from the current date.
For each user print one line in the order user's descriptions appear in the input. If the requested date doesn't exist print "Unspecified Server Error". Otherwise, print the command that will select target date in the calendar. Below are the rules on how to construct the command. If the requested date is correct (exists), print the command to enter new date in the format: year changes, month changes, day selection. All non-empty blocks must be separated by a single space.
4 4 4 2019 30 6 2020 26 10 2019 1 1 2019 26 10 2019 20 10 2018 26 10 2019 29 2 2019
d:1 r:2 [5][3] l:9 [1][3] u:1 [3][7] Unspecified Server Error
| Название |
|---|


