fn main() { let t = { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().parse::().unwrap() }; for _ in 0..t { if let Some(ans) = solve() { println!("{}", ans); } else { println!("-1"); } } } fn solve() -> Option { let _n = { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().parse::().unwrap() }; let s: Vec = { let mut line = String::new(); std::io::stdin().read_line(&mut line).unwrap(); line.trim().chars().collect() }; let target_chars: Vec = "helloworld".chars().collect(); let is_match = |start_idx: usize| { for (i, &c) in target_chars.iter().enumerate() { if s[start_idx + i] != '?' && s[start_idx + i] != c { return false; } } true }; for start_idx in (0..(s.len() - target_chars.len() + 1)).rev() { if is_match(start_idx) { let mut ans: Vec = s.iter().map(|&c| if c == '?' { 'a' } else { c }).collect(); for i in 0..target_chars.len() { ans[start_idx + i] = target_chars[i]; } return Some(ans.iter().collect()); } } None }