#include <bits/stdc++.h>
int main(void) {
  char eibun[1001];
  char* pos;
  int kazu, nowkazu;
  scanf("%d", &kazu);
  for (nowkazu = 0; nowkazu < kazu; nowkazu++) {
    fgets(eibun, sizeof(eibun), stdin);
    while (pos = strstr(eibun, "Hoshino")) {
      *(pos + 6) = 'a';
    }
    printf("%s", eibun);
  }
  return 0;
}
