#include <bits/stdc++.h>
using namespace std;
vector<string> split(string& s, char x) {
  int i;
  vector<string> res(1);
  int word = 0;
  for ((i) = 0; (i) < (int)(s.size()); (i)++) {
    if (s[i] != x)
      res[word].push_back(s[i]);
    else if (i != 0 && i != s.size() - 1) {
      word++;
      res.push_back("");
    }
  }
  return res;
}
int main() {
  int i, j, N;
  scanf("%d\n", &N);
  for ((i) = 0; (i) < (int)(N); (i)++) {
    string in;
    getline(cin, in);
    vector<string> sp = split(in, ' ');
    for ((j) = 0; (j) < (int)(sp.size()); (j)++) {
      if (sp[j] == "Hoshino") sp[j] = "Hoshina";
      if (sp[j] == "Hoshino.") sp[j] = "Hoshina.";
      cout << sp[j];
      if (j != sp.size() - 1)
        cout << ' ';
      else
        cout << endl;
    }
  }
  return 0;
}
