#include "bits/stdc++.h"
using namespace std;

int main()
{
  int n;
  cin >> n;

  while (n--){
    string str;
    getline(cin, str);
    for (int i = 0; i <= str.size(); i++){
      if (str.substr(i, 7) == "Hoshino") str[i + 6] = 'a';
      cout << str[i];
    }
    cout << endl;
  }

  return (0);
}