#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, judge = "";
  int n, count = -1;
  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 + 1] == ' ' || j == str.size() - 1) {
        count++;
        if (judge == "Hoshino" && count == 0) {
          cout << "Hoshina";
        } else if (judge == " Hoshino" && count > 0) {
          cout << " Hoshina";
        } else {
          cout << judge;
        }
        judge = "";
      }
    }
    cout << endl;
    count = -1;
  }
  return 0;
}
