#include #include #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n, m) for (int i = (int)(n); i > (int)(m); i--) #define rep1(i, n, m) for (int i = (int)(n); i < (int)(m); i++) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() using namespace atcoder; using ll = long long; const ll MOD1 = 1000000007LL; const ll MOD2 = 998244353LL; using namespace std; using namespace atcoder; const vector> dpos4 = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; // const vector> dpos8 = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; template bool chmax(T &a, const T &b) { if (a < b) { a = b; // aをbで更新 return true; } return false; } template bool chmin(T &a, const T &b) { if (a > b) { a = b; // aをbで更新 return true; } return false; } template T pow(T a, ll b){ if(b == 0) return 1; if(b % 2 == 0) return pow(a / 2, b / 2); return a * pow(a, b - 1); } int main() { int T; cin >> T; string base = "helloworld"; int M = base.size(); while(T--){ int N; cin >> N; string S; cin >> S; string ans = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzz"; rep(i, N){ if(i + M - 1 >= N) break; bool ok = true; string SS = S; rep(j, M){ if(S[i + j] != '?' && S[i + j] != base[j]) ok = false; SS[i + j] = base[j]; } SS = regex_replace(SS, regex("\\?"), "a"); if(ok) chmin(ans, SS); } if (ans == "zzzzzzzzzzzzzzzzzzzzzzzzzzzzz") ans = "-1"; cout << ans << '\n'; } return 0; }