/* -*- coding: utf-8 -*- * * 2925.cc: No.2925 2-Letter Shiritori - yukicoder */ #include #include using namespace std; /* main */ int main() { char s[4]; scanf("%s", s); int st = s[0] - 'a'; printf("? %c%c\n", 'a' + st, 'a' + st); fflush(stdout); for (;;) { char op[4], s[4]; scanf("%s%s", op, s); if (op[0] == '?') { int u = s[0] - 'a', v = s[1] - 'a'; printf("? %c%c\n", 'a' + v, 'a' + st); fflush(stdout); } else { break; } } return 0; }