#include #include #include #include #include using namespace std; long long fact(long long n){long long i,j;for(i=1ll,j=1ll;i>c){ s[i++]=(int)c; if (c=='w') w+=1; } n=0; for (j=0;j