eolymp
bolt
Try our new interface for solving problems
Məsələlər

Реформа английского языка

Реформа английского языка

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} должна быть всегда строчной.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
Too swift for Theex, too quick for Gallow,
Too strong for young Prince Joseph to follow.
Çıxış verilənləri #1
Tu svift for Ziks, tu kvik for Galov,
Tu strong for ung Prinse Josef to folov.