#include <bits/stdc++.h>
int main(int argc, char *argv[]) {
  char *p, eng[1002];
  int n;
  scanf("%d ", &n);
  while (n--) {
    fgets(eng, 1000, stdin);
    for (p = eng; *(p + 6) != '\0'; p++) {
      if (!strncmp(p, "Hoshino", 7)) *(p + 6) = 'a';
    }
    printf("%s", eng);
  }
}
