#P3880. JLOI Game Hints Generation

    ID: 17128 Type: Default 1000ms 256MiB

JLOI Game Hints Generation

JLOI Game Hints Generation

In a popular game on the JLOI website, contestants face very difficult questions. If no answer is provided within the allocated time, the system will progressively reveal three hints according to specific rules. The answer consists of letters and the following characters: . , : ; ! ? - and spaces (spaces do not appear at the beginning or end of the answer).

Letters are defined as the lowercase letters a...z and uppercase letters A...Z. Among these, the vowels are: \(a, e, i, o, u, A, E, I, O, U\).

Hint Generation Rules:

  1. First Hint: Replace every letter in the answer with a dot \('.'\). All other characters (punctuation and spaces) remain unchanged.
  2. Second Hint: Count the total number of letters in the answer. Let \(N\) be the natural number closest to \(\frac{\text{total letters}}{3}\). Starting from the first hint, reveal (i.e. replace the dot with the actual letter) the first \(N\) letters, in the order they appear in the answer.
  3. Third Hint: From the second hint, reveal any unrevealed letters that are vowels. If there is no vowel left to reveal, then starting from the first hint, reveal the first \(\left\lfloor \frac{2\times (\text{total letters})}{3} + 0.5 \right\rfloor\) letters (i.e. the first \(2/3\) of the letters, rounded to the nearest natural number).

Input: A single line containing the answer string.

Output: Print the three hints on three separate lines.

inputFormat

The input consists of a single line containing a string that represents the answer. The string includes letters, the characters . , : ; ! ? -, and spaces (spaces do not appear at the beginning or end).

outputFormat

Output three lines. The first line is the first hint, the second line is the second hint, and the third line is the third hint, generated as according to the rules described above.

sample

Hello, World!
....., .....!

Hel.., .....! Hel.lo, .o...!

</p>