def interactive_game(): import sys input = sys.stdin.read data = input().split() alpha = data[0] used_strings = set() last_char = alpha for i in range(26): next_char = chr(ord('a') + i) new_string = last_char + next_char if new_string not in used_strings: used_strings.add(new_string) print(f"? {new_string}") sys.stdout.flush() response = input().strip() if response == "! WIN" or response == "! LOSE": break # Update last_char to the second character of the string written by the system if response.startswith("?"): last_char = response[2] else: break if __name__ == "__main__": interactive_game()