#include "math.h" #include #include #include #include #include #include #include #include #include #define ifor(i, a, b) for (int i = (a); i < (b); i++) #define rfor(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n)-1; i >= 0; i--) using namespace std; typedef long double ld; typedef long long int lli; typedef long long int ll; typedef complex P; const double eps = 1e-11; int vex[4] = {1, 0, -1, 0}; int vey[4] = {0, 1, 0, -1}; typedef vector Vec; typedef vector vec; typedef vector MAT; typedef vector mat; lli MOD = 1000000007; #define MAX 200005 #define inf MAX lli gcd(lli a, lli b) { return b > a ? gcd(b, a) : (b == 0 ? a : gcd(b, a % b)); } vector> l; lli extgcd(lli a, lli b, lli& x, lli& y) { lli g = a; x = 1; y = 0; if (b != 0) g = extgcd(b, a % b, y, x), y -= (a / b) * x; l.push_back(pair(a, b)); return g; } int main() { lli x, y, z, tx = 0, ty = 0; cin >> x >> y >> z; //cout << extgcd(x, y, tx, ty) << endl; z % extgcd(x, y, tx, ty); //cerr << tx << ' ' << ty << endl; lli m = MOD; rep(i, l.size()) { if (abs(l[i].first) + abs(l[i].second) < m) { m = abs(l[i].first) + abs(l[i].second); tx = l[i].first; ty = l[i].second; } } if (z % gcd(x, y) != 0) { cout << "NO" << endl; } else { tx *= (z / gcd(x, y)); ty *= (z / gcd(x, y)); if (tx > 0) { cout << "c"; rep(i, tx - 1) { cout << "cC"; } } else if (tx == 0) { cout << "ccW"; } else { tx = -tx; rep(i, tx + 2) { cout << "c"; } rep(i, tx + 1) { cout << "W"; } } if (ty > 0) { cout << "w"; rep(i, ty - 1) { cout << "wC"; } } else if (ty == 0) { cout << "wwW"; } else { ty = -ty; rep(i, ty + 2) { cout << "w"; } rep(i, ty + 1) { cout << "W"; } } cout << "C" << endl; } }