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
409 B

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