#include <bits/stdc++.h>
using namespace std;
int main() {
  string str, line;
  int n, k = 0;
  char *words[1000];
  cin >> n;
  getline(cin, line);
  for (int i = 0; i < n; i++) {
    getline(cin, line);
    stringstream ss(line);
    while (ss >> str) {
      k++;
    }
    ss.str("");
    ss.clear(stringstream::goodbit);
    stringstream xx(line);
    for (int i = 0; i < k - 1; i++) {
      xx >> str;
      if (str == "Hoshino")
        cout << "Hoshina"
             << " ";
      else
        cout << str << " ";
    }
    xx >> str;
    if (str == "Hoshino")
      cout << "Hoshina" << endl;
    else if (str == "Hoshino.")
      cout << "Hoshina." << endl;
    else
      cout << str << endl;
    k = 0;
  }
}
