文理学院程序设计在线练习


Repeater

Time Limit: 1 Second(s)    Memory Limit: 32 MB

Total Submission(s): 13   Accepted Submission(s): 10
Problem Description

Xiaoxi wants you to write a program to simulate a repeater.
Given a non-empty string without spaces, if the three characters at the end are "ma?", reply to "En!" (without quotation marks). Otherwise, repeat it.

Input

The first line contains an integer T to denote the number of testcases (T<=200).
Each testcase has only one line contains a string without spaces, the length of the string is no more than 200 characters.

Output

For each testcase, print a string respecting your answer in one line.

Sample Input
3
Nihaoma?
Xiexieni!
Hello?
Sample Output
En!
Xiexieni!
Hello?
Source

2019绍兴联赛