{"problem":{"name":"K. Stepan and Vowels","description":{"content":"Stepan likes to repeat vowel letters when he writes words. For example, instead of the word \"_pobeda_\" he can write \"_pobeeeedaaaaa_\". Sergey does not like such behavior, so he wants to write a progr","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF795K"},"statements":[{"statement_type":"Markdown","content":"Stepan likes to repeat vowel letters when he writes words. For example, instead of the word \"_pobeda_\" he can write \"_pobeeeedaaaaa_\".\n\nSergey does not like such behavior, so he wants to write a program to format the words written by Stepan. This program must combine all consecutive equal vowels to a single vowel. The vowel letters are \"_a_\", \"_e_\", \"_i_\", \"_o_\", \"_u_\" and \"_y_\".\n\nThere are exceptions: if letters \"_e_\" or \"_o_\" repeat in a row exactly 2 times, like in words \"_feet_\" and \"_foot_\", the program must skip them and do not transform in one vowel. For example, the word \"_iiiimpleeemeentatiioon_\" must be converted to the word \"_implemeentatioon_\".\n\nSergey is very busy and asks you to help him and write the required program.\n\n## Input\n\nThe first line contains the integer _n_ (1 ≤ _n_ ≤ 100 000) — the number of letters in the word written by Stepan.\n\nThe second line contains the string _s_ which has length that equals to _n_ and contains only lowercase English letters — the word written by Stepan.\n\n## Output\n\nPrint the single string — the word written by Stepan converted according to the rules described in the statement.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Stepan 在写单词时喜欢重复元音字母。例如，他不会写 \"_pobeda_\"，而是写成 \"_pobeeeedaaaaa_\"。\n\nSergey 不喜欢这种行为，因此他想编写一个程序来格式化 Stepan 写的单词。该程序必须将所有连续相同的元音字母合并为一个元音字母。元音字母为 \"_a_\"、\"_e_\"、\"_i_\"、\"_o_\"、\"_u_\" 和 \"_y_\"。\n\n但存在例外：如果字母 \"_e_\" 或 \"_o_\" 恰好连续出现 #cf_span[2] 次，例如单词 \"_feet_\" 和 \"_foot_\"，程序必须跳过它们，不将其合并为一个元音字母。例如，单词 \"_iiiimpleeemeentatiioon_\" 必须被转换为 \"_implemeentatioon_\"。\n\nSergey 非常忙碌，请求你帮助他编写所需的程序。\n\n第一行包含整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100 000]) —— Stepan 写的单词中的字母数量。\n\n第二行包含字符串 #cf_span[s]，其长度等于 #cf_span[n]，且仅包含小写英文字母 —— Stepan 写的单词。\n\n请输出一个字符串 —— 根据题述规则转换后的 Stepan 写的单词。\n\n## Input\n\n第一行包含整数 #cf_span[n] (#cf_span[1 ≤ n ≤ 100 000]) —— Stepan 写的单词中的字母数量。第二行包含字符串 #cf_span[s]，其长度等于 #cf_span[n]，且仅包含小写英文字母 —— Stepan 写的单词。\n\n## Output\n\n请输出一个字符串 —— 根据题述规则转换后的 Stepan 写的单词。\n\n[samples]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"Let $ s $ be a string of length $ n $, consisting of lowercase English letters.  \nLet $ V = \\{a, e, i, o, u, y\\} $ be the set of vowels.\n\nDefine a transformation $ T(s) $ as follows:\n\nFor each maximal contiguous substring of identical characters $ c^k $ (i.e., $ c $ repeated $ k $ times):\n\n- If $ c \\notin V $, leave it unchanged: $ c^k \\mapsto c^k $.\n- If $ c \\in V $:\n  - If $ c \\in \\{e, o\\} $ and $ k = 2 $, leave it unchanged: $ c^2 \\mapsto c^2 $.\n  - Otherwise, replace $ c^k $ with a single $ c $: $ c^k \\mapsto c $.\n\nOutput the resulting string after applying $ T $ to all maximal contiguous vowel runs in $ s $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF795K","tags":["implementation","strings"],"sample_group":[["13\npobeeeedaaaaa","pobeda"],["22\niiiimpleeemeentatiioon","implemeentatioon"],["18\naeiouyaaeeiioouuyy","aeiouyaeeioouy"],["24\naaaoooiiiuuuyyyeeeggghhh","aoiuyeggghhh"]],"created_at":"2026-03-03 11:00:39"}}