#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, judge = "";
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    if (i == 0) {
      getline(cin, str);
    }
    getline(cin, str);
    for (int j = 0; j < str.size(); j++) {
      judge += str[j];
      if (str[j] < 'A' && str[j] > 'z' || str[j] == ' ' || judge[0] != 'H') {
        cout << judge;
        judge = "";
      }
      if (judge == "Hoshino") {
        cout << "Hoshina";
        judge = "";
      } else if (j == str.size() - 1) {
        cout << judge;
        judge = "";
      }
    }
    cout << endl;
  }
  return 0;
}
