#include <bits/stdc++.h>
int main(void) {
  int number_of_times;
  char str_data[1001];
  char str_tmp[1001];
  char *p;
  scanf("%d", &number_of_times);
  while (number_of_times-- > 0) {
    gets(str_data);
    while ((p = strstr(str_data, "Hosino")) != NULL) {
      *p = '\0';
      p += 6;
      strcpy(str_tmp, p);
      strcat(str_data, "Hosina");
      strcat(str_data, str_tmp);
    }
    printf("%s\n", str_data);
  }
  return 0;
}
