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