#include<iostream>

using namespace std;

int main(){
  int num;
  cin >> num;
  string trash;
  getline(cin,trash);
  for(int j = 0; j < num; j++){
    string in;
    getline(cin,in);
    int status = 1;
    string out;
    in += '\n';
    for(int i = 0; i < in.length(); i++){
      if(status){
	if(i == in.length()-1) cout << in[i];

	out = in[i];
	status = 0;
	continue;
      }
      if(in[i] >= 'a' && in[i] <= 'z'|| in[i] >= 'A'&& in[i] <= 'Z'){
	out += in[i];
	status = 0;
      }else{
	if(out == "Hoshino") cout << "Hoshina" << in[i];
	else cout << out << in[i];
	status = 1;
      }
    }
  }
  return 0;
}