{"id":348213,"date":"2023-06-01T03:00:43","date_gmt":"2023-06-01T03:00:43","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=348213"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=348213","title":{"rendered":"<span>\u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0438 \u0441\u043b\u043e\u0432\u0430 \u043d\u0430 \u0441\u043b\u043e\u0433\u0438<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\"><abbr title=\"2023-04-24\">\u041e\u0434\u043d\u0430\u0436\u0434\u044b<\/abbr> \u043d\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c\u043e\u043c \u043c\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0437\u0430\u043d\u044f\u0442\u0438\u0438 <font color=\"#BFBFBF\">[<\/font><font color=\"gray\">\u043f\u043e <abbr title=\"\u042f\u0437\u044b\u043a\u0430\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\">\u042f\u041f<\/abbr><\/font><font color=\"#BFBFBF\">]<\/font> \u044f, \u0441\u043a\u0443\u0447\u0430\u044f, \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b. \u0413\u043b\u0430\u0437 \u0437\u0430\u0446\u0435\u043f\u0438\u043b\u0441\u044f \u0437\u0430 \u0437\u043d\u0430\u043a \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u043c\u0438\u043b\u0438\u0438 \u041b\u0435\u043c\u0437\u0435\u043a\u00f3\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b <font color=\"#BFBFBF\">[<\/font><font color=\"gray\">\u0434\u043b\u044f \u0441\u0435\u0431\u044f<\/font><font color=\"#BFBFBF\">]<\/font> \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u043d\u0451\u0441 \u0444\u0430\u043c\u0438\u043b\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u042f \u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0447\u0451\u043b \u044d\u0442\u0443 \u0444\u0430\u043c\u0438\u043b\u0438\u044e \u043f\u043e \u0441\u043b\u043e\u0433\u0430\u043c, \u0438 \u0442\u0443\u0442 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0430 \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043c\u043e\u0437\u0433 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e \u0441\u043b\u043e\u0433\u0430\u043c?\u00bb \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f &quot;\u041b\u0435\u043c-\u0437\u0435-\u043a\u043e\u0432&quot;, \u0430 \u043d\u0435 &quot;\u041b\u0435-\u043c\u0437\u0435-\u043a\u043e\u0432&quot; \u0438\u043b\u0438 &quot;\u041b\u0435\u043c-\u0437\u0435\u043a-\u043e\u0432&quot;. \u042f \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u0435\u0449\u0451 <abbr title=\"\u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0410-\u043b\u0435\u043a-\u0441\u0430\u043d-\u0434\u0440\u043e-\u0432\u0438\u0447 \u043e\u0442-\u0432\u0435\u0442-\u0441\u0442\u0432\u0435\u043d-\u043d\u043e\u0441\u0442\u044c \u043a\u043e-\u043e-\u043f\u0435-\u0440\u0430-\u0446\u0438-\u044f\">\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/abbr>, \u0438 \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u044f \u0438\u0445 \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u044f\u043b \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0441\u044f \u0442\u0430\u043a\u043e\u0439 (\u043f\u0440\u0438\u0432\u043e\u0436\u0443 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 Python-\u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u043e\u043c \u0442\u043e\u0433\u0434\u0430 \u043d\u0430 \u0437\u0430\u043d\u044f\u0442\u0438\u0438).  <\/p>\n<pre><code class=\"python\">slog_start = 0 i = 0 while i &lt; len(word):     if word[i] in vowels_set:         vowel_pos = i         i += 1         while i &lt; len(word):             if word[i] in vowels_set:                 if i - vowel_pos == 1:                     hyphens.append(i)                 elif i - vowel_pos == 2:                     hyphens.append(i - 1)                 else:                     hyphens.append(vowel_pos + 2) <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u043c\u0435\u043d\u044f \u043e\u0441\u0435\u043d\u0438\u043b\u043e: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u043d\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0433\u043b\u0430\u0441\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 (\u043f\u0443\u0441\u0442\u044c \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u044f\u0445 <i>a<\/i> \u0438 <i>b<\/i>) \u2014 \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0440\u0430\u0432\u043d\u043e 1, \u0442\u043e\u0433\u0434\u0430 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c <abbr title=\"\u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c \u0441\u043b\u043e\u0433\u043e\u0432\">\u043f\u0435\u0440\u0435\u043d\u043e\u0441<\/abbr> \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 <i>b<\/i>, \u0435\u0441\u043b\u0438 \u0440\u0430\u0432\u043d\u043e 2, \u0442\u043e \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 <i>b<\/i> \u2212 1, \u0438\u043d\u0430\u0447\u0435 <font color=\"#BFBFBF\">[<\/font><font color=\"gray\">\u0442.\u0435. \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 2<\/font><font color=\"#BFBFBF\">]<\/font> \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 <i>a<\/i> + 2.<\/p>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u043e\u0439 Python-\u043a\u043e\u0434:  <\/p>\n<pre><code class=\"python\">word = input()  vowels_set = set('\u0430\u0435\u0451\u0438\u043e\u0443\u044b\u044d\u044e\u044f\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f') vowels = [] for i in range(len(word)):     if word[i] in vowels_set:         vowels.append(i)  import collections hyphens = collections.deque() for i in range(1, len(vowels)):     a, b = vowels[i-1], vowels[i]     if b - a == 1:         hyphens.append(b)     elif b - a == 2:         hyphens.append(b - 1)     else:         hyphens.append(a + 2)  for i in range(len(word)):     if len(hyphens) and hyphens[0] == i:         print('-', end = '')         hyphens.popleft()     print(word[i], end = '') <\/code><\/pre>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u041c\u043e\u0436\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434, \u0438\u0437\u0431\u0430\u0432\u0438\u0432\u0448\u0438\u0441\u044c \u043e\u0442 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 `vowels`:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">word = input()  vowels_set = set('\u0430\u0435\u0451\u0438\u043e\u0443\u044b\u044d\u044e\u044f\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f') prev_vowel = len(word) for i in range(len(word)):     if word[i] in vowels_set:         prev_vowel = i         break  import collections hyphens = collections.deque() for i in range(prev_vowel + 1, len(word)):     if word[i] in vowels_set:         a, b = prev_vowel, i         if b - a == 1:             hyphens.append(b)         elif b - a == 2:             hyphens.append(b - 1)         else:             hyphens.append(a + 2)         prev_vowel = i  for i in range(len(word)):     if len(hyphens) and hyphens[0] == i:         print('-', end = '')         hyphens.popleft()     print(word[i], end = '') <\/code><\/pre>\n<\/div><\/div>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c <abbr title=\"\u0435\u0441\u043b\u0438 \u0442\u0430\u043a\u0430\u044f \u0431\u0443\u043a\u0432\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0433\u043b\u0430\u0441\u043d\u044b\u043c\u0438, \u0442\u043e\u0433\u0434\u0430 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u043d\u0443\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u043d\u0435\u0451\">\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443<\/abbr> \u0431\u0443\u043a\u0432 \u00ab\u0439\u00bb, \u00ab\u044c\u00bb \u0438 \u00ab\u044a\u00bb.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043b\u0435\u0433\u043a\u0430 \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0443\u0441\u043b\u043e\u0432\u0438\u0439 \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0443\u044e\u0441\u044f \u0441 <code>if b - a == 1:<\/code>:  <\/p>\n<pre><code class=\"python\">for i ...:     ...     if b - a == 1:         hyphens.append(b)     else:         for j in reversed(range(a + 1, b)):             if word[j] in specials_set: # specials_set = set('\u0439\u044c\u044a\u0419\u042c\u042a')                 hyphens.append(j + 1)                 break         else:             if b - a == 2:                 hyphens.append(b - 1)             else:                 hyphens.append(a + 2) <\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0415\u0449\u0451 \u043e\u0434\u043d\u0430 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f (\u043e\u0442\u043a\u0430\u0437 \u043e\u0442 `hyphens`), \u0438 \u0432\u043e\u0442 \u0447\u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0438\u0442\u043e\u0433\u0435:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">word = input()  vowels_set = set('\u0430\u0435\u0451\u0438\u043e\u0443\u044b\u044d\u044e\u044f\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f') specials_set = set('\u0439\u044c\u044a\u0419\u042c\u042a')  prev_vowel = len(word) for i in range(len(word)):     if word[i] in vowels_set:         prev_vowel = i         break  pos = 0 for i in range(prev_vowel + 1, len(word)):     if word[i] in vowels_set:         a, b = prev_vowel, i         if b - a == 1:             print(word[pos:b], end = '-')             pos = b         else:             for j in reversed(range(a + 1, b)):                 if word[j] in specials_set:                     print(word[pos:j + 1], end = '-')                     pos = j + 1                     break             else:                 if b - a == 2:                     print(word[pos:b - 1], end = '-')                     pos = b - 1                 else:                     print(word[pos:a + 2], end = '-')                     pos = a + 2         prev_vowel = i print(word[pos:]) <\/code><\/pre>\n<\/div><\/div>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043e\u0442\u0432\u0435\u0447\u0443 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0439 \u0432\u043e\u043f\u0440\u043e\u0441 \u00ab\u0438 \u043a \u0447\u0435\u043c\u0443 \u0432\u0441\u0451 \u044d\u0442\u043e?\u00bb, \u0432\u0435\u0434\u044c \u0435\u0441\u0442\u044c \u0436\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/138088\/#comment_4606304\">\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u041f. \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430 \u0432 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0414\u044b\u043c\u0447\u0435\u043d\u043a\u043e \u0438 \u0412\u0430\u0440\u0441\u0430\u043d\u043e\u0444\u044c\u0435\u0432\u0430<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043a \u0442\u043e\u043c\u0443 \u0436\u0435, <a href=\"https:\/\/ru.wiktionary.org\/wiki\/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:hyphenation\" rel=\"nofollow noopener noreferrer\">\u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f<\/a> \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e, \u043d\u043e \u0438 \u0434\u043b\u044f \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u041d\u0443, \u0432\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u043f\u043e \u0444\u0430\u043a\u0442\u0443 \u0434\u043b\u044f \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u0433\u043e \u043e\u043d \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0438\u0437-\u0437\u0430 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439 \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430. \u0412\u043e-\u0432\u0442\u043e\u0440\u044b\u0445, \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0432 \u043d\u0451\u043c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0441\u043e\u043c\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0430\u0432\u0438\u043b\u043e &quot;\u0433\u0441\u0441-\u0441\u0441\u0433&quot; \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a <a href=\"http:\/\/new.gramota.ru\/biblio\/readingroom\/rules\/141-perenos\" rel=\"nofollow noopener noreferrer\">\u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0439<\/a> \u0440\u0430\u0437\u0431\u0438\u0432\u043a\u0435 \u0441\u043b\u043e\u0432\u0430 &quot;\u043e\u0442\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c&quot;. \u041d\u0443 \u0438 \u0432-\u0442\u0440\u0435\u0442\u044c\u0438\u0445, \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0439 \u043c\u043d\u043e\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u0435\u0435.<\/p>\n<p>  P. S. \u041a\u0441\u0442\u0430\u0442\u0438, \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u0435\u043d \u0435\u0441\u043b\u0438 \u043a\u0442\u043e \u0434\u0430\u0441\u0442 \u0441\u0441\u044b\u043b\u043e\u0447\u043a\u0443 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u041f. \u0425\u0440\u0438\u0441\u0442\u043e\u0432\u0430, \u0442.\u043a. \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043a\u0430\u043a\u0438\u0435 \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0441\u0434\u0435\u043b\u0430\u043b\u0438 \u0414\u044b\u043c\u0447\u0435\u043d\u043a\u043e \u0438 \u0412\u0430\u0440\u0441\u0430\u043d\u043e\u0444\u044c\u0435\u0432.<\/p>\n<p>  P. P. S. \u041f\u043e\u0438\u0441\u043a\u043e\u043c \u043f\u043e <a href=\"https:\/\/ru.stackoverflow.com\/a\/1440777\" title=\"&lt;- google:\u2018\u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0441\u043b\u043e\u0432 txt\u2019\" rel=\"nofollow noopener noreferrer\">\u0441\u043f\u0438\u0441\u043a\u0443 \u0432\u0441\u0435\u0445 \u0440\u0443\u0441\u0441\u043a\u0438\u0445 \u0441\u043b\u043e\u0432<\/a> \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043b\u043e\u0441\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0432 \u0441 5-\u044e \u043f\u043e\u0434\u0440\u044f\u0434 \u0438\u0434\u0443\u0449\u0438\u043c\u0438 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 {\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \u0430\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u043e, \u0430\u043d\u0433\u0441\u0442\u0440\u0435\u043c, \u0431\u043e\u0434\u0440\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435, \u0438\u043d\u0442\u0435\u043b\u043b\u0438\u0433\u0435\u043d\u0442\u0441\u0442\u0432\u043e}. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 (\u0442.\u0435. \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c\u0438 \u0433\u043b\u0430\u0441\u043d\u044b\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0440\u0430\u0432\u043d\u043e 6) \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 <i>a<\/i> + 3 \u0438\u043b\u0438 <font color=\"#BFBFBF\">[<\/font><font color=\"gray\">\u0447\u0442\u043e \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435<\/font><font color=\"#BFBFBF\">]<\/font> <i>b<\/i> \u2212 3.<br \/>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0438, \u043a\u043e\u0433\u0434\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0433\u043b\u0430\u0441\u043d\u044b\u043c\u0438 \u0440\u0430\u0432\u043d\u043e 1 \u0438\u043b\u0438 2: \u0432 \u043e\u0431\u043e\u0438\u0445 \u044d\u0442\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 <i>a<\/i> + 1.  <\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"python\">vowels_set = set('\u0430\u0435\u0451\u0438\u043e\u0443\u044b\u044d\u044e\u044f\u0410\u0415\u0401\u0418\u041e\u0423\u042b\u042d\u042e\u042f') specials_set = set('\u0439\u044c\u044a\u0419\u042c\u042a')  word = input()  prev_vowel = len(word) for i in range(len(word)):     if word[i] in vowels_set:         prev_vowel = i         break  pos = 0 for i in range(prev_vowel + 1, len(word)):     if word[i] in vowels_set:         a, b = prev_vowel, i         for j in reversed(range(a + 1, b)):             if word[j] in specials_set:                 npos = j + 1                 break         else:             if b - a &lt;= 2:                 npos = a + 1             elif b - a &gt;= 6:                 npos = b - 3             else:                 npos = a + 2         print(word[pos:npos], end = '-')         pos = npos         prev_vowel = i print(word[pos:]) <\/code><\/pre>\n<\/div><\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/739026\/\"> https:\/\/habr.com\/ru\/articles\/739026\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\"><abbr title=\"2023-04-24\">\u041e\u0434\u043d\u0430\u0436\u0434\u044b<\/abbr> \u043d\u0430 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u043c\u043e\u043c \u043c\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0437\u0430\u043d\u044f\u0442\u0438\u0438 <font color=\"#BFBFBF\">[<\/font><font color=\"gray\">\u043f\u043e <abbr title=\"\u042f\u0437\u044b\u043a\u0430\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f\">\u042f\u041f<\/abbr><\/font><font color=\"#BFBFBF\">]<\/font> \u044f, \u0441\u043a\u0443\u0447\u0430\u044f, \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u043e\u0432 \u0433\u0440\u0443\u043f\u043f\u044b. \u0413\u043b\u0430\u0437 \u0437\u0430\u0446\u0435\u043f\u0438\u043b\u0441\u044f \u0437\u0430 \u0437\u043d\u0430\u043a \u0443\u0434\u0430\u0440\u0435\u043d\u0438\u044f \u0432 \u0444\u0430\u043c\u0438\u043b\u0438\u0438 \u041b\u0435\u043c\u0437\u0435\u043a\u00f3\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b <font color=\"#BFBFBF\">[<\/font><font color=\"gray\">\u0434\u043b\u044f \u0441\u0435\u0431\u044f<\/font><font color=\"#BFBFBF\">]<\/font> \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0437\u043d\u0451\u0441 \u0444\u0430\u043c\u0438\u043b\u0438\u044e \u044d\u0442\u043e\u0433\u043e \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u0430 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u042f \u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u043f\u0440\u043e\u0447\u0451\u043b \u044d\u0442\u0443 \u0444\u0430\u043c\u0438\u043b\u0438\u044e \u043f\u043e \u0441\u043b\u043e\u0433\u0430\u043c, \u0438 \u0442\u0443\u0442 \u0443 \u043c\u0435\u043d\u044f \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0430 \u043f\u043e \u043a\u0430\u043a\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u043c\u043e\u0437\u0433 \u0440\u0430\u0437\u0431\u0438\u0432\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430 \u043f\u043e \u0441\u043b\u043e\u0433\u0430\u043c?\u00bb \u041f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f &quot;\u041b\u0435\u043c-\u0437\u0435-\u043a\u043e\u0432&quot;, \u0430 \u043d\u0435 &quot;\u041b\u0435-\u043c\u0437\u0435-\u043a\u043e\u0432&quot; \u0438\u043b\u0438 &quot;\u041b\u0435\u043c-\u0437\u0435\u043a-\u043e\u0432&quot;. \u042f \u0432\u044b\u043f\u0438\u0441\u0430\u043b \u0435\u0449\u0451 <abbr title=\"\u0430 \u0438\u043c\u0435\u043d\u043d\u043e: \u0410-\u043b\u0435\u043a-\u0441\u0430\u043d-\u0434\u0440\u043e-\u0432\u0438\u0447 \u043e\u0442-\u0432\u0435\u0442-\u0441\u0442\u0432\u0435\u043d-\u043d\u043e\u0441\u0442\u044c \u043a\u043e-\u043e-\u043f\u0435-\u0440\u0430-\u0446\u0438-\u044f\">\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432<\/abbr>, \u0438 \u0440\u0430\u0437\u0433\u043b\u044f\u0434\u044b\u0432\u0430\u044f \u0438\u0445 \u0440\u0430\u0437\u043c\u044b\u0448\u043b\u044f\u043b \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-348213","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=348213"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/348213\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=348213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=348213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=348213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}