P3880 [JLOI2008] Hint Problem

Description

In a popular game on the JLOI website, players must answer difficult questions. If they cannot answer within the time limit, the system provides $1$ hint, followed by the $2$nd and $3$rd hints in order. The answer consists of letters and the following characters: $\verb|. , : ; ! ? - |$ and spaces (spaces do not appear at the beginning or the end). Letters are: lowercase letters $\verb!a! \cdots \verb!z!$ and uppercase letters $\verb!A! \cdots \verb!Z!$, where a e i o u A E I O U are vowels. Rules for generating hints: - 1st hint: simply replace all letters with $\verb!.!$. - 2nd hint: derived from the 1st hint. Count all letters, divide the total by three, take the natural number $N$ closest to the quotient, and reveal the first $N$ letters. - 3rd hint: derived from the 2nd hint, reveal the remaining vowels. If there are no vowels to reveal, derive it from the 1st hint instead, i.e., reveal the first $2/3$ of the letters (if it is not divisible by $3$, round to the nearest integer as well).

Input Format

One line containing the question, with at most $50$ characters.

Output Format

Three lines: the three hints produced according to the rules.

Explanation/Hint

Translated by ChatGPT 5