use std::io::{read_to_string, Write}; use proconio::input_interactive; fn main() { input_interactive!(alpha: String); let mut prev = alpha.repeat(2); loop { println!("? {}", prev.chars().rev().collect::()); std::io::stdout().flush().unwrap(); let line = read_to_string(std::io::stdin()).unwrap(); let mut line = line.split_whitespace(); let symbol = line.next().unwrap().parse::().unwrap(); if symbol == '!' { break; } let t = line.next().unwrap(); prev = t.to_string(); } }