/* -*- coding: utf-8 -*- * * 2226.cc: No.2226 Hello, Forgotten World! - yukicoder */ #include #include using namespace std; /* constant */ const int MAX_N = 1000; const int L = 10; const char T[] = "helloworld"; /* typedef */ /* global variables */ char s[MAX_N + 4]; /* subroutines */ bool match(char w[]) { for (int i = 0; i < L; i++) if (w[i] != '?' && w[i] != T[i]) return false; return true; } /* main */ int main() { int tn; scanf("%d", &tn); while (tn--) { int n; scanf("%d%s", &n, s); int k = n - L; for (; k >= 0; k--) if (match(s + k)) break; if (k < 0) { puts("-1"); continue; } for (int i = 0; i < L; i++) s[k + i] = T[i]; for (int i = 0; i < n; i++) if (s[i] == '?') s[i] = 'a'; puts(s); } return 0; }