#include <bits/stdc++.h>
int main() {
  int n, i, j, k, f;
  char s[1005], k1[] = "Hoshino", k2[] = "Hoshina";
  scanf("%d\n", &n);
  while (n--) {
    fgets(s, 1003, stdin);
    for (i = 0; i < strlen(s) - 7; i++) {
      f = 0;
      for (j = 0; j < 7; j++) {
        if (s[i + j] == k1[j])
          f++;
        else
          break;
      }
      if (f == 7) {
        for (j = 0; j < 7; j++) s[i + j] = k2[j];
      }
    }
    printf("%s", s);
  }
  return 0;
}
