#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  char *p, *np, str[1002] = {0};
  int n;
  for (scanf("%d ", &n); n--;) {
    fgets(str, 1000, stdin);
    str[strlen(str) - 1] = 0;
    for (p = str; np = strchr(p, ' '); p = np) {
      *np = 0;
      if (!strcmp(p, "Hoshino")) p[6] = 'a';
      *np++ = ' ';
    }
    if (!strcmp(p, "Hoshino") || !strcmp(p, "Hoshino.")) p[6] = 'a';
    puts(str);
  }
  return 0;
}
