#include <bits/stdc++.h>
int main() {
  int n, i;
  char str[1001], *pt;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    getchar();
    scanf("%[^\n]*s", str);
    pt = strtok(str, " ");
    while (pt != NULL) {
      if (strcmp(pt, "Hoshino") == 0)
        printf("Hoshina");
      else
        printf("%s", pt);
      if (*(pt + 1) != NULL) putchar(' ');
      pt = strtok(NULL, " ");
    }
    putchar('\n');
  }
  return 0;
}
