#include #include #include #define repeat(i,n) for (int i = 0; (i) < (n); ++(i)) #define repeat_from(i,m,n) for (int i = (m); (i) < (n); ++(i)) typedef long long ll; using namespace std; string solve(ll x, ll y, ll z) { const int limit = 10000; repeat_from (b, -limit/2, limit/2+1) { int a = (z - y*b) / x; if (a*x + y*b == z) { string s; if (a > 0) { s += 'c'; -- a; } else if (b > 0) { s += 'w'; -- b; } else { s += "ccW"; } if (s.length() + 2*abs(a) + 2*abs(b) > limit) continue; repeat (i, abs(a)) (s += 'c') += (a > 0 ? 'C' : 'W'); repeat (i, abs(b)) (s += 'w') += (b > 0 ? 'C' : 'W'); return s; } } return ""; } int main() { int x, y, z; cin >> x >> y >> z; int gcd = __gcd(x, y); string ans; if (z % gcd == 0) ans = solve(x / gcd, y / gcd, z / gcd); if (ans.empty()) ans = "mourennaihasimasenn"; cout << ans << endl; return 0; }