/* * Problem link * http://yukicoder.me/problems/1100 */ #include using namespace std; struct INIT{INIT(){cin.tie(0);ios_base::sync_with_stdio(false);} }init; typedef long long LL; inline bool inner(LL x,LL lb,LL ub) { return(lb <= x && x <= ub); } #define SZ 10000 int main() { LL x, y, z; cin >> x >> y >> z; assert(inner(x, 0, 100000000)); assert(inner(y, 0, 100000000)); assert(inner(z, 0, 100000000)); /*多分分けなくてもいいけどz=0は分けたほうが楽だと思います.*/ if (z == 0) cout << "ccW" << endl; /*これは分けないと多分事故る*/ else if (x == 0 && y ==0) cout << "NO" << endl; else if (x == 0) { if (z%y == 0 && (z / y) * 2 - 1 <= SZ) { for (int i = 0; i < (z / y); i++)cout << 'w'; for (int i = 1; i < (z / y); i++)cout << 'C'; cout << endl; } else cout << "NO" << endl; } else if (y == 0) { if (z%x == 0 && (z / x) * 2 - 1 <= SZ) { for (int i = 0; i < (z / x); i++)cout << 'c'; for (int i = 1; i < (z / x); i++)cout << 'C'; cout << endl; } else cout << "NO" << endl; } else { for (int n = 1; n <= 5000; n++) { if ((z - n * x) % y == 0 && abs((z - n * x) / y) * 2 + n * 2 - 1 <= SZ) { for (int i = 0; i < abs((z - n * x) / y); i++)cout << 'w'; for (int i = 0; i < n; i++)cout << 'c'; for (int i = 1; i < n; i++)cout << 'C'; for (int i = 0; i < abs((z - n * x) / y); i++) if (z - n*x < 0)cout << 'W'; else cout << 'C'; cout << endl; return 0; } if ((z - n * y) % x == 0 && abs((z - n * y) / x) * 2 + n * 2 - 1 <= SZ) { for (int i = 0; i < abs((z - n * y) / x); i++)cout << 'c'; for (int i = 0; i < n; i++)cout << 'w'; for (int i = 1; i < n; i++)cout << 'C'; for (int i = 0; i < abs((z - n * y) / x); i++) if (z - n*y < 0)cout << 'W'; else cout << 'C'; cout << endl; return 0; } } cout << "NO" << endl; } return 0; }