#include <bits/stdc++.h>
int main(void) {
  char str[8] = {"Hoshino"}, a[1001];
  int n, i, j;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    gets(a);
    for (j = 0; j < 993; j++) {
      if (strncmp(&a[j], str, 7) == 0) {
        j += 7;
        a[j - 1] = 'a';
      }
    }
    for (j = 0; a[j] != '\0' && a[j] != '\n'; j++) printf("%c", a[j]);
    printf("\n");
  }
  return 0;
}
