#include <bits/stdc++.h>
int main(void) {
  char Hoshina[1001];
  char Block[501][501];
  int i;
  int j;
  int k;
  int l;
  int disp;
  scanf("%d", &i);
  while (i >= 0) {
    gets(Hoshina);
    j = 0;
    k = 0;
    l = 0;
    while (Hoshina[j] != '\0') {
      if (Hoshina[j] != ' ') {
        Block[k][l] = Hoshina[j];
        j++;
        l++;
      } else {
        Block[k][l] = '\0';
        l = 0;
        j++;
        k++;
      }
    }
    Block[k][l] = '\0';
    disp = 0;
    while (disp != k + 1) {
      if (strcmp(Block[disp], "Hoshino") == 0) {
        strcpy(Block[disp], "Hoshina");
      }
      printf("%s", Block[disp]);
      if (disp != k) {
        printf(" ");
      } else {
        printf("\n");
      }
      disp++;
    }
    i--;
  }
  return (0);
}
