const string t = "helloworld"; bool chk(string s, int x) { string cmp = s.substr(x, 10); rep(i, 10) { if (cmp[i] != t[i] && cmp[i] != '?') { return false; } } return true; } void solve() { ll @N; string @S; bool ok = false; string ans(N, 'z'); rep(i, N - 9) { if (chk(S, i)) { ok = true; string now; rep(j, N) { if (S[j] == '?') { if (j >= i && j < i + 10) { now.push_back(t[j - i]); } else now.push_back('a'); } else { now.push_back(S[j]); } } if (now < ans) ans = now; } } if (ok) wt(ans); else wt(-1); } { REP(rd_int()) { solve(); } }