#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    char str[1001];
    gets(str);
    for (int j = 0, len = strlen(str); j < len - 6; j++) {
      if (strcmp(&str[j], "Hoshino") == 0) {
        strncpy(&str[j], "Hoshina", strlen("Hoshina"));
      }
      cout << str << endl;
    }
  }
  return 0;
}
