const string t = "helloworld"; const ll sz_t = t.size(); bool contain(string&s, ll x){ ll n = s.size(); rep(i, sz_t){ if (s[i+x]!=t[i]) {return false;} } return true; } bool imply(string&s, ll x){ ll n = s.size(); rep(i, sz_t){ if (s[i+x] != t[i] && s[i+x] != '?') {return false;} } rep(i, sz_t){ 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 - sz_t) + 1) { if (contain(s, i)) { fill(s); wt(s); return; } } rrep(i, (n - sz_t) + 1) { if (imply(s, i)) { fill(s); wt(s); return; } } wt(-1); } { REP(rd_int()) {solve();} }