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