eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Реформа англійської мови

Реформа англійської мови

1 квітня 20?? року буде проведено реформу англійської мови, яка дозволить полегшити її вивчення іноземцям та англійським школярам. По-перше, з алфавіту видалять чотири літери \textbf{C}, \textbf{Q}, \textbf{W} и \textbf{X} (на клавіатурі комп`ютера замість них будуть клавіші, які викликають програми \textbf{W}ord, e\textbf{X}cel та інші). Замість \textbf{c} перед літерами \textbf{e}, \textbf{i}, \textbf{y} потрібно буде писати літеру \textbf{s}, а в інших випадках -- літеру \textbf{k}. Замість літери \textbf{q} потрібно буде писати літеру \textbf{k}, замість сполучення \textbf{qu} -- \textbf{kv}, замість \textbf{x} -- \textbf{ks}, а замість \textbf{w} -- \textbf{v}. По-друге, сполучення літер \textbf{ph} будет записуватись як \textbf{f}, \textbf{you} та \textbf{oo} -- як \textbf{u}, \textbf{ee} -- як \textbf{i}, \textbf{th} -- як \textbf{z}. Крім того, всі подвійні приголосні (включаючи утворені після замін), які викликають великі проблеми в учнів, стануть одинарними, наприклад, \textbf{apple} післе реформи потрібно писати як \textbf{aple}. У зв`язку з реформою потрібно опрацювати величезну кількість текстів. Напишіть програму, яка виконувала б цю роботу. \textbf{Примітка для допитливих} Основою для задачі стали декілька гумористичних нарисів: The European Union commissioners have announced that agreement has been reached to adopt English as the preferred language for European communications, rather than German, which was the other possibility. As part of the negotiations, Her Majesty's Government conceded that English spelling had some room for improvement and has accepted a five-year phased plan for what will be known as EuroEnglish (Euro for short). In the first year, "s" will be used instead of the soft "c". Sertainly sivil servants will resieve this news with joy. Also, the hard "c" will be replased witk "k". Not only will this klear up konfusion, but typewriters kan have one less letter. There will be growing publik enthusiasm in the sekond year, when the troublesome "ph" will be replaced by "f". This will make words like "fotograf" 20 persent shorter. In the third year, publik akseptanse of the new spelling kan be expekted to reach the stage where more komplikated changes are possible. Governments will enkorage the removal of double letters, which have always ben a deterent to akurate speling. Also, al will agre that the horible mes of silent "e"s in the languag is disgrasful, and they would go. By the fourth year, people wil be reseptiv to steps such as replasing "th" by "z" and "w" by "v". During ze fifz year, ze unesesary "o" kan be dropd from vords kontaining "ou" and similar changes vud of kors be aplid to ozer kombinations of leters. After ze fifz yer, ve vil hav a reli sensibl riten styl. Zer vil be no mor trubls or difikultis and evrivun vil find it ezi tu understand ech ozer. Ze drem vil finali kum tru. \textbf{A Plan for the Improvement of English Spelling by M. J. Shields (Mark Twain?)} For example, in Year 1 that useless letter "c" would be dropped to be replased either by "k" or "s," and likewise "x" would no longer be part of the alphabet. The only kase in which "c" would be retained would be the "ch" formation, which will be dealt with later. Year 2 might reform "w" spelling, so that "which" and "one" would take the same konsonant, wile Year 3 might well abolish "y" replasing it with "i" and Iear 4 might fiks the "g / j" anomali wonse and for all. Jenerally, then, the improvement would kontinue iear bai iear with Iear 5 doing awai with useless double konsonants, and Iears 6-12 or so modifaiing vowlz and the rimeining voist and unvoist konsonants. Bai Iear 15 or sou, it wud fainali bi posibl tu meik ius ov thi ridandant letez "c," "y," and "x" -- bai now jast a memori in the maindz ov ould doderez -- tu riplais "ch," "sh," and "th" rispektivli. Fainali, xen, aafte sam 20 iers ov orxogrefkl riform, wi wud hev a lojikl, kohirnt speling in ius xrewawt xe Ingliy-spiking werld. \InputFile У вхідному файлі міститься текст на англійській мові, без переносів слів. Довжина рядків не перевищує \textbf{100} символів. \OutputFile У вихідний файл вивести той же текст, але вже такий, що відповідає реформі. Якщо перша літера замінюваного сполучення літер була великою, то перша літера заміни повинна бути також прописною. Друга літера в замінах \textbf{x} → \textbf{ks}, \textbf{qu} → \textbf{kv} повинна бути завжди рядковою.
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
Too swift for Theex, too quick for Gallow,
Too strong for young Prince Joseph to follow.
Вихідні дані #1
Tu svift for Ziks, tu kvik for Galov,
Tu strong for ung Prinse Josef to folov.