I am sorry for mistakes in English and I will be glad if you tell me about them.
In this task, it was necessary to write exactly what has been described in statement. In particular, it was necessary to have people, who come to the meeting. For this it was necessary to create clones.
In this problem you had to write exactly what has been described in statment too. Read lines one by one. Also keep the last block of lines that are not amplyfying. If the next line is amplyfying (which can be checked by linear search), we print the last block, if any, and the line itself. Otherwise, remove all spaces from the string and add to the last block.