#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; const int MAX = 10000; string solve(int x, int y) { if(x < 0){ string s = solve(y, x); for(unsigned i=0; i> x >> y >> z; if(x == 0 && y == 0){ if(z == 0) cout << "c" << endl; else cout << "mourennaihasimasenn" << endl; return 0; } for(int i=-MAX; i<=MAX; ++i){ long long a = z - x * i; long long j = 0; if(y == 0){ if(a != 0) continue; } else{ if(a % y != 0) continue; j = a / y; if((abs(i) + abs(j)) * 2 - 1 > MAX) continue; } string ans = solve(i, j); cout << ans << endl; return 0; } cout << "mourennaihasimasenn" << endl; return 0; }