#include <bits/stdc++.h>
int main(void) {
  char eibun[1001];
  char* kensaku;
  char* pos;
  int kazu, nowkazu;
  scanf("%d", &kazu);
  while (getchar() != '\n')
    ;
  for (nowkazu = 0; nowkazu < kazu; nowkazu++) {
    fgets(eibun, sizeof(eibun), stdin);
    kensaku = eibun;
    while (pos = strstr(kensaku, "Hoshino")) {
      if ((*(pos + 7) == ' ' || *(pos + 7) == '.' || *(pos + 7) == ',' ||
           *(pos + 7) == '!' || *(pos + 7) == '?' || *(pos + 7) == '\n' ||
           *(pos + 7) == 0) &&
          (pos == eibun || *(pos - 1) == ' '))
        *(pos + 6) = 'a';
      kensaku = pos + 1;
    }
    printf("%s", eibun);
  }
  return 0;
}
