#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #ifdef local #include #else #define dump(...) void(0); #endif #include #include #include #include namespace man { } int main() { std::cin.tie(nullptr) -> sync_with_stdio(false); using namespace std::views; char a; std::cin >> a; std::unordered_set t; while(true) { std::string s; s += a; for(const auto c: iota('a', 'z' + 1)) { s += c; if(t.contains(s)) { s.pop_back(); } else { std::cout << "? " << s << std::endl; t.emplace(s); break; } } if(std::ssize(t) == 51) { break; } char dummy; std::cin >> dummy >> s; assert(std::ssize(s) == 2); if(t.contains(s)) { break; } t.emplace(s); a = s.back(); } std::cout << "! WIN" << std::endl; }