#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; b++) { if ((a != 0 && b != 0) && 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; } if (ma > 0) { for (int i = 0; i < abs(mb); i++) { std::cout << "w"; } for (int i = 0; i < abs(ma); i++) { std::cout << "c"; } for (int i = 0; i < abs(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 < abs(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; }