#include <bits/stdc++.h>
int main(void) {
  int datanum;
  char s[1001], *p;
  scanf("%d", &datanum);
  fgets(s, sizeof(s), stdin);
  for (int i = 0; i < datanum; i++) {
    fgets(s, sizeof(s), stdin);
    s[strlen(s) - 1] = '\0';
    while (p = strstr(s, "Hoshino")) {
      p[6] = 'a';
    }
    printf("%s\n", s);
  }
  return 0;
}
