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