#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  while (getchar() != '\n')
    ;
  for (int i = 0; i < n; i++) {
    char str[1001];
    fill(str, str + 1001, '\0');
    char *p;
    fgets(str, sizeof(str), stdin);
    for (int j = 0; j < 1001; j++) {
      if (str[j] == '\n') {
        str[j] = '\0';
      }
    }
    while (strstr(str, "Hoshino") != NULL) {
      p = strstr(str, "Hoshino");
      *(p + 6) = 'a';
    }
    cout << str << endl;
  }
  return 0;
}
