#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n;
  cin >> n;
  cin.ignore();
  string text, s, ret;
  string str = "Hoshino";
  string astr = "Hoshina";
  for (int i = 0; i < n; ++i) {
    getline(cin, text);
    ret = text;
    for (int j = 0; j < text.size() - 6; ++j) {
      s = text.substr(j, str.size());
      if (s.compare(str) == 0) {
        ret = text.replace(j, astr.size(), astr);
        break;
      }
    }
    cout << "ans: " << ret << endl;
  }
}
