#include <bits/stdc++.h>
void strcng(char *input, const char *search, const char *insert) {
  char *p;
  char temp[1000];
  while ((p = strstr(input, search)) != NULL) {
    *p = '\0';
    p += strlen(search);
    strcpy(temp, p);
    strcat(input, insert);
    strcat(input, temp);
  }
}
int main() {
  int datanum;
  int i;
  char str[1000];
  scanf("%d ", &datanum);
  for (i = 0; i < datanum; i++) {
    fgets(str, 1000, stdin);
    strcng(str, "Hoshino", "Hoshina");
    printf("%s", str);
  }
  return 0;
}
