#include <bits/stdc++.h>
int main(void) {
  int n;
  char in[1002], *ptr;
  scanf("%d ", &n);
  while (n--) {
    fgets(in, 1001, stdin);
    ptr = in;
    while (*ptr != '\0') {
      if (strstr(ptr, "Hoshino") == ptr) {
        printf("%s", "Hoshina");
        ptr += 7;
      } else {
        putchar(*ptr);
        ptr++;
      }
    }
  }
  return 0;
}
