#include <bits/stdc++.h>

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

vector<string> split(const string& input)
{
	istringstream stream(input);

	string field;
	vector<string> result;
	while( std::getline(stream, field, ' ') )
	{
		result.push_back(field);
	}
	return result;
}

int main()
{
	int n;

	scanf("%d\n", &n);
	loop(i, 0, n)
	{
		string line;
		std::getline(cin, line);
		
		vector<string> words = split(line);
		for(vector<string>::iterator it = words.begin(); it != words.end(); it++)
		{
			if( *it == "Hoshino" )
			{
				printf("Hoshina ");
			}
			else
			{
				cout << *it << ' ';
			}
		}
		cout << endl;
	}
	return (0);
}