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