You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
398 B

#include <bits/stdc++.h>
using namespace std;
const int N = 110;
string s;
/*
WMWM
答案:
WWWW
*/
// WMWM
int main() {
cin >> s;
for (int i = 0; i < s.size(); i++) {
if (i % 2 == 1) {
if (s[i] == 'W')
cout << 'M';
else
cout << 'W';
} else
cout << s[i];
}
return 0;
}