#include using namespace std; using ll = long long; using ld = long double; using u32 = uint32_t; using vi = vector; using vvi = vector; using vb = vector; using vvb = vector; using vl = vector; using vvl = vector; using vd = vector; using vvd = vector; #define REP(i,n) for(auto i = 0 * (n), i##_len = (n); i < i##_len; ++i) #define ALL(c) (c).begin(), (c).end() #define FOR(i,s,n) for(ll i=s, i##_len=(ll)(n); i> a >> b >> c; ll x, y; ll d = extgcd(a, b, &x, &y); auto cww = [&](ll x, ll y, ll c, const string & s) { string C = "c", W = "w"; if (c % d) return false; x *= c / d; y *= c / d; ll ans = 0; if (x < 0) { ans += -x + y + max(0, y - 1) -x; } else if (y < 0) { ans += -y + x + max(0, x - 1) - y; } else { ans += x + y + max(0, x - 1 + y); } if (s.size() + ans <= 10000) { string ans; if (x < 0) { REP(i, -x) ans += C; REP(i, y) ans += W; REP(i, y - 1) ans += "C"; REP(i, -x) ans += "W"; } else if (y < 0) { REP(i, -y) ans += W; REP(i, x) ans += C; REP(i, x - 1) ans += "C"; REP(i, -y) ans += "W"; } else { REP(i, x) ans += C; REP(i, y) ans += W; REP(i, y + x - 1) ans += "C"; } cout << s << ans << endl; return true; } return false; }; string s; REP(i, c / a) { if (s.size() >= 10000) break; if (cww(x, y, c - i*a, s)) return 0; if (i == 0) s = "c"; s += "cC"; } s = "" ; REP(i, c / b) { if (s.size() >= 10000) break; if (cww(x, y, c - i*b, s)) return 0; if (i == 0) s = "w"; s += "wC"; } cout << "mourennaihasimasenn" << endl; return 0; }