This program reads a date represented by three integers: year, month, and day, followed by a formatting instruction.
The formatting instruction can be one of the following three types:
|
Instruction
|
Output order
|
|---|---|
|
MMDDYY
|
month/day/year
|
|
DDMMYY
|
day/month/year
|
|
YYMMDD
|
year/month/day
|
The program must output the date in the specified order.
The year must be printed using four digits, and both month and day must be printed using two digits, padded with leading zeros if necessary.
A slash / should be placed between the components.
The first line of input:
year month day
The second line of input:
A string representing the formatting instruction (one of: MMDDYY, DDMMYY, YYMMDD)
One formatted date string based on the given instruction.
Ensure that the output formatting exactly matches the samples provided.