#include #include #include #include #include int main() { long long x, y, z; std::cin >> x >> y >> z; int a, b, ma, mb, total; ma = mb = 100000; total = 100000; for (a = -10000; a < 10000; a++) { for (b = -10000; b < 10000 - abs(a); b++) { if (a * x + b * y == z && abs(a) + abs(b) < total) { total = abs(a) + abs(b); ma = a; mb = b; } } } if (total + (total - 1) > 10000) { std::cout << "mourennaihasimasenn" << std::endl; return 0; } int count = 0; if (ma > 0) { for (int i = 0; i < abs(mb); i++) { std::cout << "w"; } for (int i = 0; i < ma; i++) { std::cout << "c"; } for (int i = 0; i < ma - 1; i++) { std::cout << "C"; } if (mb < 0) { for (int i = 0; i < abs(mb); i++) { std::cout << "W"; } } else { for (int i = 0; i < abs(mb); i++) { std::cout << "C"; } } } else { for (int i = 0; i < abs(ma); i++) { std::cout << "c"; } for (int i = 0; i < mb; i++) { std::cout << "w"; } for (int i = 0; i < abs(mb) - 1; i++) { std::cout << "C"; } if (ma < 0) { for (int i = 0; i < abs(ma); i++) { std::cout << "W"; } } else { for (int i = 0; i < abs(ma); i++) { std::cout << "C"; } } } std::cout << std::endl; return 0; }