|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||36||24||23||69.697%|
Mrs Jones, a primary school teacher, has thought of a way to help her young pupils to learn to spell. She is removing certain letters from sentences and replacing them with underscore characters. The children have to write the appropriate letters in the spaces. As a starting point, Mrs Jones takes 2 different letters from a sentence (such as a and e), and the children have to work out whether each underscore represents an 'a' or an 'e', for example.
Input to this problem will consist of a number of cases, terminated by a line containing just # #. Each case will begin with two lower case letters on a single line, separated by a space, followed by a line containing a single integer n (1 ≤ n ≤ 100) which gives the number of lines of text making up the case. The following n lines each contain a line of text of up to 255 characters.
Output for each case will be the case number, followed by 1 line for each line of text presented in the input. The text will be as input but with every occurrence of either of the two letters replaced by an underscore character (_). Although the letters provided are in lowercase, uppercase versions of the same letter must also be replaced. Leave a blank line between cases.
a e 2 Come here Evans, said the teacher. I think not. p r 1 Purple reindeer rarely appear in Ruritania. # #
Case 1 Com_ h_r_ _v_ns, s_id th_ t__ch_r. I think not. Case 2 _u__le _eindee_ _a_ely a__ea_ in _u_itania.