#include using namespace std; pair extgcd(long long a, long long b, long long c) { if (b == 0) return make_pair(c, 0); long long x, y; tie(x, y) = extgcd(b, a % b, c); return make_pair(y, x - a / b * y); } int gcd(int x, int y) { if (y == 0) return x; return gcd(y, x % y); } int main() { int x, y, z; cin >> x >> y >> z; int g = gcd(x, y); if (z % g != 0) { cout << "mourennaihasimasenn" << endl; return 0; } x /= g; y /= g; z /= g; long long a, b; tie(a, b) = extgcd(x, y, z); if (a < 0) { for (int i = 0; i < abs(b); i++) cout << "w"; for (int i = 0; i < abs(b) - 1; i++) cout << "C"; for (int i = 0; i < abs(a); i++) cout << "c"; for (int i = 0; i < abs(a) - 1; i++) cout << "C"; if (a != 0) cout << "W" << endl; } else { for (int i = 0; i < abs(a); i++) cout << "c"; for (int i = 0; i < abs(a) - 1; i++) cout << "C"; for (int i = 0; i < abs(b); i++) cout << "w"; for (int i = 0; i < abs(b) - 1; i++) cout << "C"; if (b != 0) cout << "W" << endl; } }