#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define pi acos(-1.0) typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVI; typedef pair P; typedef pair PL; int gcd(int a, int b){ if (b == 0) return a; return gcd(b, a % b); } int extgcd(int a, int b, int &x, int &y){ int d = a; if (b != 0){ d = extgcd(b, a % b, y, x); y -= (a / b) * x; }else{ x = 1; y = 0; } return d; } int main(){ int x, y, z; cin >> x >> y >> z; int d = gcd(x,y); if (z % d != 0){ cout << "mourennaihasimasenn" << endl; return 0; } x /= d; y /= d; z /= d; int p, q; extgcd(x, y, p, q); p *= z; q *= z; string s1, s2; REP(i,abs(p)) s1 += 'c'; REP(i,abs(p)-1) s1 += 'C'; REP(i,abs(q)) s2 += 'w'; REP(i,abs(q)-1) s2 += 'C'; if (p == 0) cout << s2 << endl; else if (q == 0) cout << s1 << endl; else if (p > 0 && q > 0) cout << s1 + s2 + 'C' << endl; else if (p < 0) cout << s2 + s1 + 'W' << endl; else cout << s1 + s2 + 'W' << endl; return 0; }