#include <bits/stdc++.h>
using namespace std;
int main() {
  string str[1099];
  string s;
  int test, k;
  char ch;
  cin >> test;
  cin.ignore();
  while (test--) {
    k = 0;
    while (cin >> s) {
      if (s == " ") continue;
      str[k] = s;
      ch = getchar();
      if (ch == '\n') break;
      k++;
    }
    for (int i = 0; i <= k; i++) {
      if (str[i] == "Hoshino") str[i] = "Hoshina";
    }
    for (int i = 0; i <= k; i++) cout << str[i] << " ";
    cout << endl;
  }
  return 0;
}
