#include using namespace std; #define REP(i,n) for(int i=0;i ostream& operator<<(ostream& os,const vector& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; } template ostream& operator<<(ostream& os,const pair& p){ os << "(" << p.first << ","<< p.second <<")"; return os; } typedef long long ll; typedef unsigned long long ull; typedef pair pii; typedef vector vi; typedef vector vvi; ll gcd(ll a,ll b){ if(b==0) return a; else return gcd(b,a%b); } constexpr ll mod = 1e9+7; const int dx[]={1,0,-1,0} ,dy[] = {0,1,0,-1}; #define NO cout<<"NO"<; int main(){ cin>>x>>y>>z; string ans; vector vp; cout << maxsize << endl; if(z==0){ cout << "ccW" << endl; return 0; } for(int i=0;imaxsize) continue; vp.push_back(p3(i+abs(rem/y),i,rem/y)); } } for(int i=0;imaxsize) continue; vp.push_back(p3(i+abs(rem/x),rem/x,i)); } } if(vp.empty()){ NO; return 0; } sort(all(vp)); ll a = get<1>(vp[0]); ll b = get<2>(vp[0]); debug2(a,b); if(a>=0 and b>=0){ rep(i,a) ans.push_back('c'); rep(i,b) ans.push_back('w'); rep(i,a+b-1) ans.push_back('C'); }else if(a<0){ rep(i,abs(a)) ans.push_back('c'); rep(i,b) ans.push_back('w'); rep(i,b-1) ans.push_back('C'); rep(i,abs(a)) ans.push_back('W'); }else if(b<0){ rep(i,abs(b)) ans.push_back('w'); rep(i,a) ans.push_back('c'); rep(i,a-1) ans.push_back('C'); rep(i,abs(b)) ans.push_back('W'); }else{ NO; return 0; // assert(false); } assert(ans!=""); cout << ans << endl; }