No.536 Artificial Intelligence
Problem Statement
In a certain community, there is a custom that when naming an artificial intelligence, the AI's name is made by transforming the ID of its creator.
The creator's ID is a string of at least 2 and at most 10 characters consisting of lowercase letters.
- If the last 2 characters of the creator's ID are ai, the AI's name is the creator's ID with its last 2 characters converted to uppercase.
- If the creator's ID does not satisfy the above, the AI's name is the creator's ID with -AI appended to its end.
The creator's ID is given from standard input. Output the AI's name according to the custom.
Input
S
$S$ is the creator's ID.
$2 \le |S| \le 10$
The string $S$ consists of lowercase letters.
Output
Output the AI's name according to the custom described in the problem statement.
Print a newline at the end.
Sample
Sample 1
Input
samurai
Output
samurAI
The last 2 characters of the creator's ID are ai, so output the string obtained by converting the last 2 characters of the creator's ID to uppercase.
Sample 2
Input
yuki
Output
yuki-AI
The creator's ID does not end with ai, so output the string obtained by appending -AI to the end of the creator's ID.
Sample 3
Input
maibuyoh
Output
maibuyoh-AI
The string contains ai, but not at its end, so instead of converting the last 2 characters to uppercase, append -AI to the end.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
くれちー