#include using namespace std; #define ll long long #define ull unsigned long long #define db double #define pii pair #define pll pair #define ti3 tuple #define int128 __int128_t #define pii128 pair const int inf = 1 << 30; const ll linf = 1e18; const ll mod = 1e9 + 7; const db EPS = 1e-10; const db pi = acos(-1); template bool chmin(T& x, T y){ if(x > y) { x = y; return true; } else return false; } template bool chmax(T& x, T y){ if(x < y) { x = y; return true; } else return false; } // overload macro #define CAT( A, B ) A ## B #define SELECT( NAME, NUM ) CAT( NAME, NUM ) #define GET_COUNT( _1, _2, _3, _4, _5, _6 /* ad nauseam */, COUNT, ... ) COUNT #define VA_SIZE( ... ) GET_COUNT( __VA_ARGS__, 6, 5, 4, 3, 2, 1 ) #define VA_SELECT( NAME, ... ) SELECT( NAME, VA_SIZE(__VA_ARGS__) )(__VA_ARGS__) // rep(overload) #define rep( ... ) VA_SELECT(rep, __VA_ARGS__) #define rep2(i, n) for (decay_t i = 0; i < n; i++) #define rep3(i, a, b) for (decay_t i = a; i < b; i++) #define rep4(i, a, b, c) for (decay_t i = a; i < b; i += c) // rrep(overload) #define rrep( ... ) VA_SELECT(rrep, __VA_ARGS__) #define rrep2(i, n) for (decay_t i = n - 1; i >= 0; i--) #define rrep3(i, a, b) for (decay_t i = b - 1; i >= a; i--) #define rrep4(i, a, b, c) for (decay_t i = b - 1; i >= a; i -= c) // for_earh #define fore(e, v) for (auto&& e : v) // vector #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() string hw = "helloworld"; void solve() { int N; string S; cin >> N >> S; rep (i, N - hw.size() + 1) { bool ok = true; rep (j, hw.size()) { ok &= (S[i + j] == '?' || S[i + j] == hw[j]); } if (ok) { string T = S.substr(0, i); T += hw; T += S.substr(i + hw.size()); rep (i, N) { if (T[i] == '?') T[i] = 'a'; } cout << T << "\n"; return; } } cout << -1 << "\n"; } int main() { cin.tie(nullptr); ios_base::sync_with_stdio(false); cout << fixed << setprecision(20); int t; cin >> t; while (t--) solve(); return 0; }