luogu#P3880. [JLOI2008] 提示问题

[JLOI2008] 提示问题

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 11 hint, followed by the 22nd and 33rd 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 az\verb!a! \cdots \verb!z! and uppercase letters AZ\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 NN closest to the quotient, and reveal the first NN 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/32/3 of the letters (if it is not divisible by 33, round to the nearest integer as well).

Input Format

One line containing the question, with at most 5050 characters.

Output Format

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

Upomoc! Lpv s nm pkrl sv smglsnk.
......! ... . .. .... .. ........ 
Upomoc! Lp. . .. .... .. ........ 
Upomoc! Lpv s nm pkrl s. ........

Hint

Translated by ChatGPT 5