#include <bits/stdc++.h>
int main(void) {
  int i, n;
  char sentence[1000 + 1];
  char *hoshino;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    hoshino = sentence;
    scanf("%s", sentence);
    while ((hoshino = strstr(hoshino, "Hoshino")) != NULL) hoshino[6] = 'a';
    printf("%s\n", sentence);
  }
  return 0;
}
