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