#include #include constexpr int INF = 1 << 30; template constexpr inline bool chmin(T& a, const T& b) noexcept { if(a > b){ a = b; return true; } return false; } template constexpr inline bool chmax(T& a, const T& b) noexcept { if(a < b){ a = b; return true; } return false; } int main() { int n, cnt; std::cin >> n; std::string s(n, 'a'); for(const auto i: std::views::iota(0, n)) { int chk = INF; char c; for(const auto j: std::views::iota(0, 25)) { s[i] = 'a' + j; std::cout << "? " + s + "\n"; int now; std::cin >> now; if(chmax(cnt, now)) { c = 'a' + j; } chmin(chk, now); } if(!chk) { c = 'z'; } s[i] = c; } std::cout << "! " + s << '\n'; }