const string t = "helloworld"; bool contain(string& s, ll x) { ll n = s.size(); rep(i, 9) { if (s[i + x] != t[i]) { return false; } } return true; } bool imply(string& s, ll x) { ll n = s.size(); rep(i, 9) { if (s[i + x] != t[i] && s[i + x] != '?') { return false; } } rep(i, 9) { if (s[i + x] == '?') { s[i + x] = t[i]; } } return true; } void fill(string& s) { for (auto&& x : s) { if (x == '?') { x = 'a'; } } } void solve() { ll @N; string @S; rep(i, (N - 9)) { if (contain(S, i)) { fill(S); wt(S); return; } } rrep(i, (N - 9)) { if (imply(S, i)) { fill(S); wt(S); return; } } wt(-1); } { REP(rd_int()) { solve(); } }