You work as a programmer in a company that creates a "digital archive of personal files." Your task & mdash; Develop a module to verify the introduced dates. The system should be absolutely reliable and not accept incorrect or impossible dates (for example, on February 30 or April 31), as well as data in the wrong format.
rn
The program must read the lines one after another until the user introduces & nbsp; 0 . For each introduced line, it is necessary to check: whether it is a correct, existing date in the & nbsp; dd.mm.YYYY .
Input format
The program receives several lines to the input. Each line contains either a date for verification or an arbitrary set of characters. Data entry ends when a symbol & nbsp; 0 .
is introduced in a separate line.
Output format
for each entered line (except for the final line & nbsp; 0 ), the program should display in a new line:
rn
rn -
the correct date & nbsp; & mdash; If the line is the existing date in the & nbsp; DD.MM.YYYY . In all other cases (incorrect format, non -existent date). rn
Example
Input
12.12.2024
31.04.2023
02.29.2023
Hello World
02.29.2024
01/01/2000
0
Output
The correct date
incorrect date or format
incorrect date or format
incorrect date or format
correct date
correct date
Hint
There will be no clue here, decide for yourself!