#include using namespace std; #define REP(i,a,b) for(int i=a;i<(int)b;i++) #define rep(i,n) REP(i,0,n) #define all(c) (c).begin(), (c).end() #define zero(a) memset(a, 0, sizeof a) #define minus(a) memset(a, -1, sizeof a) #define watch(a) { cout << #a << " = " << a << endl; } template inline bool minimize(T1 &a, T2 b) { return b < a && (a = b, 1); } template inline bool maximize(T1 &a, T2 b) { return a < b && (a = b, 1); } typedef long long ll; int const inf = 1<<29; ll x, y, z; namespace math { namespace integer { template value_type mod_mul(value_type x, value_type k, ll m) { if(k == 0) { return 0; } if(k % 2 == 0) { return mod_mul((x+x) % m, k/2, m); } else { return (x + mod_mul(x, k-1, m)) % m; } } template value_type mod_pow(value_type x, value_type n, ll mod) { if(n == 0) { return 1; } if(n % 2 == 0) { return mod_pow(mod_mul(x, x, mod) % mod, n / 2, mod); } else { return mod_mul(x, mod_pow(x, n - 1, mod), mod); } } template value_type extgcd(value_type a, value_type b, value_type& x, value_type& y) { value_type d = a; if(b != 0) { d = extgcd(b, a%b, y, x); y -= (a / b) * x;} else { x = 1, y = 0; } return d; } template value_type mod_inverse(value_type x, ll mod) { return mod_pow(x, value_type(mod-2), mod); /* use fermat */ } template value_type mod_inverse_composite_num_mod(value_type a, ll mod) { value_type x, y; extgcd(a, mod, x, y); return (mod + x % mod) % mod; } }} using namespace math::integer; const char* ng = "mourennaihasimasenn"; const int Lim = 10000; ll X, Y, g; /* void minimumShow(char c, ll x) { while(x > 0) { if(x & 1) { ans.push_back(c); } if(!ans.empty() && ans.back() == c) { ans += 'C'; } x >>= 1; } } */ bool verify(string& ans) { deque st; for(auto c: ans) { if(c == 'c') st.push_back(x); if(c == 'w') st.push_back(y); if(c == 'C') { if(st.empty()) return false; auto a = st.back(); st.pop_back(); if(st.empty()) return false; auto b = st.back(); st.pop_back(); st.push_back(a + b); } if(c == 'W') { if(st.empty()) return false; auto a = st.back(); st.pop_back(); if(st.empty()) return false; auto b = st.back(); st.pop_back(); st.push_back(a - b); } // for(auto e: st) cout << e << ", "; cout << endl; } if(st.size() != 1) return false; if(st.back() != z) return false; return true; } bool makeLast(string& ans) { int xp = 0, yp = 0; rep(i, -X) { ans += 'c'; if(X > 0) ans += 'c', xp++; else if(Y > 0) ans += 'w', yp++; ans += 'W'; } rep(i, -Y) { ans += 'w'; if(X > 0) ans += 'c', xp++; else if(Y > 0) ans += 'w', yp++; ans += 'W'; } rep(i, X - xp) ans += 'c'; rep(i, Y - yp) ans += 'w'; string t = ans; cout << "T = " << t << endl; rep(i, z / g - 1) ans += t; rep(i, z / g - 1) ans += 'C'; return true; } int main() { cin >> x >> y >> z; if(z == 0) return printf("ccW\n"); if(x == 0 || y == 0) return printf("%s", ng); for(int i=-5000; i<=5000; i++) { ll b = z - x * i; if(b % y) continue; ll c = b / y; if((abs(i) + abs(c)) * 2 - 1 > 10000) continue; if(i > 0 && c > 0) { cout << string(i, 'c') << string(c, 'w') << string(i + c - 1, 'C') << endl; return 0; } if(i < 0) { cout << string(abs(i), 'c') << string(abs(i) - 1, 'c') << string(c, 'w') << string(abs(c) - 1, 'C') << "W" << endl; return 0; } if(c < 0) { cout << string(abs(c), 'w') << string(abs(c) - 1, 'c') << string(abs(i), 'c') << string(abs(i) - 1, 'C') << "W" << endl; return 0; } } return printf("%s", ng); }