#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  fflush(stdin);
  while (N--) {
    char S[1001];
    for (int i = 0;; i++) {
      scanf("%c", &S[i]);
      if (S[i] == '\n') {
        S[i] = '\0';
        break;
      }
    }
    for (int i = 0; S[i] != '\0'; i++) {
      if (strncmp(S + i, "Hoshino", 7) == 0) {
        printf("Hoshina");
        i += 6;
      } else
        printf("%c", S[i]);
    }
    puts("");
  }
  return 0;
}
