#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define mod 1000000007 int main() { int x, y, z; cin >> x >> y >> z; for(int xnum = 1; xnum < 10000; xnum++){ if(abs(z - x * xnum) % y != 0) continue; int ynum = (z - x * xnum) / y; int tmpy = abs(ynum); string first(tmpy, 'w'); string second(xnum, 'c'); string third(xnum - 1, 'C'); string fourth; if(ynum < 0){ string tmp(-ynum, 'W'); fourth = tmp; } else { string tmp(ynum, 'C'); fourth = tmp; } string ans = first + second + third + fourth; if(ans.length() > 10000) continue; cout << ans << endl; return 0; } swap(x, y); for(int xnum = 1; xnum < 10000; xnum++){ if(abs(z - x * xnum) % y != 0) continue; int ynum = (z - x * xnum) / y; int tmpy = abs(ynum); string first(tmpy, 'c'); string second(xnum, 'w'); string third(xnum - 1, 'C'); string fourth; if(ynum < 0){ string tmp(-ynum, 'W'); fourth = tmp; } else { string tmp(ynum, 'C'); fourth = tmp; } string ans = first + second + third + fourth; if(ans.length() > 10000) continue; cout << ans << endl; return 0; } cout << "mourennaihasimasenn" << endl; return 0; }