#include #ifndef SHO_LOCAL #include #define debug(...) ; #else #include "debug.h" #endif #define all(x) (x).begin(), (x).end() #define lb(x, a) lower_bound(all(x), (a)) - (x).begin() typedef long long ll; using namespace std; int main() { iostream::sync_with_stdio(0), cin.tie(0); int T; cin >> T; int n; string s; const string S = "helloworld"; const string inf = string(1000, 'z'); int m = (int)S.size(); while (T--) { cin >> n >> s; string ans = inf; for (int i = 0; i + 10 <= n; i++) { bool ok = true; string now = ""; for (int j = 0; ok && j < n; j++) { if (j >= i && j < i + 10) { ok &= s[j] == '?' || s[j] == S[j - i]; now += S[j - i]; } else { if (s[j] == '?') { now += 'a'; } else { now += s[j]; } } } if (ok) { ans = min(ans, now); } } if (ans == inf) { ans = "-1"; } cout << ans << '\n'; } return 0; }