#include <bits/stdc++.h>
int main(void) {
  int N;
  while (scanf("%d", &N), N) {
    fflush(stdin);
    while (--N, N >= 0) {
      char instr[1001];
      char *t;
      gets(instr);
      while ((t = strstr(instr, "Hoshino")) != NULL) {
        t += 6;
        *t = 'a';
      }
      printf("%s\n", instr);
    }
    break;
  }
  return 0;
}
