A Tale from the Dark Side of the Moon

No attempts yetTime limit1sMemory limit128 MB

Problem

The source code of an old program is gone. All that remains is people's testimony about what it does, and you must reimplement it exactly.

The program reads ordinary text — the kind you might find in an English dictionary — one line at a time, transforms each line by the rules below, and prints the result. Apply the rules to each line in this exact order:

  1. Replace every pair of adjacent lowercase ds (dd) with a single p. (Three or more consecutive ds never occur.)
  2. Replace every ei with ie, except when the ei immediately follows the letter c (cei), in which case it stays.
  3. Replace every pink with floyd.
  4. Delete every character that is neither a lowercase English letter (az) nor a whitespace character. Whitespace is kept exactly as it appears in the input.

Each rule is evaluated on the string produced by the previous steps, and deletion (rule 4) happens last. So the adjacency required by rules 1–3 is judged on the original input. For example, d123d is not turned into p because its two ds are not adjacent — only the digits are removed, leaving dd. In contrast, the dd in 123dd is adjacent, so it becomes p.

The vv-to-m behavior from the original story was just a printer glitch, not a feature of the program. Do not apply it.

Reading stops at a line that is exactly EOF; that line and everything after it are neither processed nor printed.

Input

Several lines of text. Each line is fewer than 80 characters wide. The input ends with a line containing only EOF.

Output

For each line before the EOF line, print the result of applying the rules above in order, one line per input line. Whitespace is preserved exactly as it appears in the input.