#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
#include <string.h>
using namespace std;

#define FOR(i,s,e) for (int i = int(s); i != int(e); i++)
#define REP(i,e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int compare(const std::string& buf, const std::string& str)
{
}

int main(int argc, char const *argv[])
{
	int n;
	std::string s;
	std::getline(std::cin, s);
	std::stringstream ss(s);
	ss >> n;
	REP(i, n)
	{
		std::getline(std::cin, s);
		int k = 0;
		int l = s.length();
		while(k+7 <= l)
		{
			if (s.substr(k, 7) == "Hoshino")
				s.at(k+6) = 'a';
			k++;
		}
		std::cout << s << std::endl;
	}
	return 0;
}
#include<iostream>
#include<string>
using namespace std;
int main(){
	int n;
	int i;
	while(cin >> n){
		i=n;
		string s[n];
		cin.ignore();
		while(n--){
			getline(cin,s[n]);
			int ix=0;
			while( ( ix =s[n].find("Hoshino") ) >=0 ){
				s[n].replace(ix,7,"Hoshina");
			}
		}
		while(i--){
			cout << s[i] << endl;
		}
	}
	return 0;
}