#include using namespace std; pair extgcd(long long a, long long b, long long c) { if (b == 0) return make_pair(c, 0); long long x, y; tie(x, y) = extgcd(b, a % b, c); return make_pair(y, x - a / b * y); } int gcd(int x, int y) { if (y == 0) return x; return gcd(y, x % y); } string create(int x, char c) { if (x >= 10100) x = 10100; string s(1, c); for (int i = 0; i < x - 1; i++) { s += c; s += "C"; } return s; } int main() { int x, y, z; cin >> x >> y >> z; int g = gcd(x, y); if (z % g != 0) { cout << "mourennaihasimasenn" << endl; return 0; } x /= g; y /= g; z /= g; long long a, b; tie(a, b) = extgcd(x, y, z); long long A, B; const int N = 1e8; a -= y * N; b += x * N; for (long long i = 0; i <= 2 * N; i++) { if (abs(A) + abs(B) > abs(a) + abs(b)) { A = a; B = b; } a += y; b -= x; } cerr << A << " " << B << endl; string ans; if (B == 0) { ans = create(abs(A), 'c'); } else if (A == 0) { ans = create(abs(B), 'w'); } else if (A > 0 && B > 0) { ans = create(abs(A), 'c') + create(abs(B), 'w') + "C"; } else if (A < 0) { ans = create(abs(B), 'w') + create(abs(A), 'c') + "W"; } else if (B < 0) { ans = create(abs(A), 'c') + create(abs(B), 'w') + "W"; } if (ans.size() > 10000) { cout << "mourennaihasimasenn" << endl; } else { cout << ans << endl; } }