#include <bits/stdc++.h>
char s[300];
int n, i;
int main() {
  scanf("%d", &n);
  while (n--) {
    while (scanf("%s", s) != EOF) {
      if (strcmp(s, "Hoshino") == 0) strcpy(s, "Hoshina");
      printf("%s ", s);
    }
    printf("\n");
  }
  return 0;
}
