#include #include #include #include #include #include using namespace std; typedef long long ll; ll FIB[61]; ll gcd(ll a, ll b) { while (a) { b %= a; swap(a, b); } return b; } int main() { FIB[1] = 1; FIB[2] = 1; for (int i = 3; i < 61; i++)FIB[i] = FIB[i - 1] + FIB[i - 2]; ll x, y, z; cin >> x >> y >> z; if (z%gcd(x, y)) { cout << "mourennaihasimasenn" << endl; return 0; } pairans; for (int i = 1; i <60; i++) { if ((z-x*FIB[i]) % y == 0) { if (abs(x*FIB[i] + y * FIB[i + 1] - z) / y < 4000) { ans = make_pair(i, (z-(x*FIB[i] + y * FIB[i + 1])) / y); break; } } } cout << "cw"; for (int i = 0; i < ans.first; i++)cout << "C"; for (int i = 0; i < abs(ans.second); i++) { cout << "w"; if (ans.second>0)cout << "C"; else cout << "W"; } cout << endl; return 0; }