hw = list("helloworld") def solve(): n = int(input()) s = input() p = [] ords = [] for i in range(n): if s[i] != "?": ords.append(ord(s[i]) - ord("a")) else: ords.append(-1) for i in range(0,n-10+1): flg = 1 for j in range(10): if s[i+j] == hw[j] or s[i+j] == "?": continue flg = 0 if flg: p.append(i) if not p: print(-1) return ss = [] for i in range(len(p)): pi = p[-1] st = [] for i in range(pi): if ords[i] == -1: st.append(0) else: st.append(ords[i]) st += [7,4,11,11,14,22,14,17,11,3] for i in range(pi+10, n): if ords[i] == -1: st.append(0) else: st.append(ords[i]) ss.append(st) ss.sort() ans = [] for i in ss[0]: ans.append(chr(i + ord("a"))) print("".join(ans)) t = int(input()) for i in range(t): solve()