#include using namespace std; const string key = "helloworld"; bool OK(string& s, int j) { for (int i = 0; i < 10; i ++) { if (s[i + j] != key[i] && s[i + j] != '?') { return false; } } for (int i = 0; i < 10; i ++) { s[i + j] = key[i]; } return true; } void solve() { int N; string s; cin >> N >> s; if (N < 10) { cout << -1 << endl; return; } string ret = "{-1"; for (int i = 0; i <= N - 10; i ++) { if (s.substr(i, 10) == key) { ret = s; for (auto& c : ret) { c = (c == '?' ? 'a' : c); } break; } } string ss = s; for (int i = N - 10; i >= 0; i --) { ss = s; if (OK(ss, i)) { for (auto& c : ss) { c = (c == '?' ? 'a' : c); } ret = min(ret, ss); } } if (ret[0] == '{') { cout << -1 << endl; } else { cout << ret << endl; } return; } int main () { int N; cin >> N; for (int i = 0; i < N; i ++) { solve(); } }