P27479 [AtCoder] WAsedAC
普及
题目描述

Problem Description

To commemorate the WUPC 2019, Kato-kun received a string \(s\\) as a gift.

However, Kato-kun dislikes the string WA, so he decided to perform the following actions until there are no more WA strings:

  • Scan the string \(s\\) from the beginning, and if two consecutive characters are WA, replace them with the string AC.
  • After each replacement, start scanning the string from the beginning again. The process ends when no more replacements are made.

Output the string when Kato-kun finishes his actions.

Input Format

The input is given from the standard input in the following format:

```
\(s\)


## Output Format

Output the string when Kato-kun finishes his actions in one line.

## Sample Input and Output

### Sample Input #1

WASEDA


### Sample Output #1

ACSEDA


### Sample Input #2

WWA


### Sample Output #2

ACC
```

Notes/Hints

Constraints

  • \(1 \\leq |s| \\leq 10^5\\)
  • The input string consists only of uppercase English letters.

Sample Explanation 2

For this string, Kato-kun performs two replacements. After the first replacement, the string becomes WAC, and after the second replacement, it becomes ACC.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
WASEDA
样例输出
ACSEDA