#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  char *p, str[1002] = {0};
  int n;
  for (scanf("%d ", &n); n--;) {
    fgets(str, 1000, stdin);
    str[strlen(str) - 1] = 0;
    for (p = str; p = strstr(p, "Hoshino"); *(p += 6) = 'a')
      ;
    puts(str);
  }
  return 0;
}
