Dialogs on UCM
Fedir is very active online. He effortlessly searches for complex essays using world-renowned search engines, downloads music, and shares it with friends. He's a member of many popular communities on LiveJournal. Naturally, he also spends a lot of time chatting with his internet friends via UCM (You Seek Me), a well-known chat client.
Fedir is a school student, and part of his curriculum includes studying the Russian language. One day, his teacher assigned homework: to write at least 10-15 sentences using indirect speech.
Fedir, however, is not keen on rewriting standard phrases from school textbooks; he wants to be more creative. That's when he had an original idea: why not take a few dialogues from his favorite UCM and convert them into indirect speech?
It's a clever idea, but unfortunately, Fedir doesn't know how to program yet, as it's not taught at his school. Can you help him?
Input
The input file contains a printout of one of the dialogues on UCM. The first line indicates when Fedir's conversation partner signed on. It appears as follows:
HH:MM:SS: <Name> signed on
Here, HH:MM:SS: represents the time the interlocutor signed on, and <Name> is the interlocutor's name written in transliteration (Latin letters). Each number in the time display uses two digits, so 9 hours 43 minutes 5 seconds would be formatted as 09:43:05.
Each subsequent line (except for the very last line of the file) contains a participant's remark in the dialogue. If you number each remark, the odd-numbered ones are spoken by Fedir, and the even-numbered ones by his interlocutor.
Each remark is on a single line and includes a timestamp, the main content, and a punctuation mark at the end of the sentence.
The timestamp is formatted as: HH:MM:SS:.
The main content follows the timestamp, separated by a space, and consists of text made up of uppercase or lowercase Latin letters, numbers, spaces, apostrophes (used in place of soft and hard signs in transliteration), as well as commas, semicolons, and parentheses.
The punctuation mark can be an exclamation mark, a question mark, or a period. If omitted, a period is assumed.
Example of a remark:
HH:MM:SS: Ya skazal etu frazu.
The last line of the file is formatted as:
HH:MM:SS: <Name> signed off
where <Name> is the same interlocutor's name.
The input file size does not exceed 20 kilobytes. Each line's length does not exceed 250 characters.
Output
For each remark, output the transformed version in indirect speech.
The transformation is as follows: First, enclose the remark in double quotes. If it ends with a period, replace the period with a comma; otherwise, keep the punctuation mark unchanged. For example:
Zakanchivayu tochkoi. → "Zakanchivayu tochkoi,"
Eto voskhititel'no! → "Eto voskhititel'no!"
Then add a space, three "-" signs (dashes), another space, followed by the word "skazal" and the name of the person who made the remark. End with a period. Fedir is referred to as "Fedya", and the name of his interlocutor can be found in the first line of the input file.