2023 Ajou University Programming Contest
Time limit1sMemory limit1024 MB
Restore each word Seonwoo altered using a lookup table, or report failure when half or more of its letters were replaced.
- Level
Easy3 of 10
- Topics
- String, Hash map, Implementation
- Solved
- No attempts yet
Problem
Hyunbin, the vice president of A.N.S.I in charge of the 2023 APC, noticed something odd while reviewing the problems. Some words looked alike but were spelled with different characters. While Hyunbin wondered who had done this, he remembered a conversation he had with Seonwoo yesterday.
[Figure 1] is the actual conversation.

Hyunbin is busy as the A.N.S.I vice president, and changing the altered words back by hand is a hassle. Fortunately, Hyunbin knows which characters Seonwoo usually changes. Seonwoo changes only lowercase English letters, according to the table below.
Hyunbin decided to give up on a word if half or more of its letters have been changed. Use the table to find out whether Hyunbin can interpret the given words.
Input
The first line contains an integer . The next lines contain the words Seonwoo changed. The original words consisted only of lowercase English letters, and each word has a length of 100 or less.
Output
For each word, print the original word if Hyunbin can interpret it, or print I don't understand if he gave up. Print lines.