#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 = -1000; a < 1000; a++) { for (b = -1000; b < 1000 - a; b++) { if (a * x + b * y == z && abs(a) + abs(b) < total) { total = abs(a) + abs(b); ma = a; mb = b; } } } if (ma == 100000 && mb == 100000 || total + (total - 1) > 1000) { 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; }