import sys #input = sys.stdin.readline #input = sys.stdin.buffer.readline #文字列はダメ #sys.setrecursionlimit(1000000) import math import bisect #import itertools #import random #from heapq import heapify, heappop, heappush from collections import defaultdict from collections import deque import copy #DeepCopy: hoge = [_[:] for _ in hogehoge] #from functools import lru_cache #@lru_cache(maxsize=None) #MOD = pow(10,9) + 7 MOD = 998244353 dx = [1,0,-1,0] dy = [0,1,0,-1] #dx8 = [1,1,0,-1,-1,-1,0,1] #dy8 = [0,1,1,1,0,-1,-1,-1] base1 = 1007; base2 = 2009 mod1 = 1000000007; mod2 = 1000000009 class RollingHash(): def __init__(self, s, base, mod): self.mod = mod self.pw = pw = [1]*(len(s)+1) l = len(s) self.h = h = [0]*(l+1) v = 0 for i in range(l): h[i+1] = v = (v * base + ord(s[i])) % mod v = 1 for i in range(l): pw[i+1] = v = v * base % mod def get(self, l, r): #S[l:r]indexでいうl文字目からr-1文字目。r-l文字。 return (self.h[r] - self.h[l] * self.pw[r-l]) % self.mod def get_hash(s,base,mod): ns = len(s) ret = 0 v = 0 for i in range(ns): v = (v * base + ord(s[i])) % mod ret += v ret %= mod return ret def main(): word = "helloworld" ok1 = set([]); ok2 = set([]) n = len(word) for i in range(1<>j)&1 == 1: temp += '?' else: temp += word[j] RH1 = RollingHash(temp,base1,mod1) RH2 = RollingHash(temp,base2,mod2) ok1.add(RH1.get(0,10)) ok2.add(RH2.get(0,10)) # if i == 0: # print(temp) # print(RH1.get(0,10)) T = int(input()) for _ in range(T): N = int(input()) S = input() RH1 = RollingHash(S,base1,mod1) RH2 = RollingHash(S,base2,mod2) ans = []; Flag = False # print(RH1.get(0,0+10)) for i in range(N-9): if RH1.get(i,i+10) in ok1 and RH2.get(i,i+10) in ok2: ans.append("helloworld") Flag = True break else: # print(i,S[i]) if S[i] == '?': ans.append('a') else: ans.append(S[i]) if not Flag: print(-1) continue for j in range(i+10,N): if S[j] == '?': ans.append('a') else: ans.append(S[j]) print("".join(ans)) if __name__ == '__main__': main()