#include <iostream>
#include <string>
using namespace std;

void solve()
{
	int n;
	cin >> n;
	fflush(stdin);
	for(int i = 0; i < n; ++i)
	{
		string c;
		getline(cin, c);
		for(int j = 0; j < c.size(); ++j)
		{
			if(c[j] == 'H' && j < c.size() - 6)
			{
				if(c[j + 1] == 'o' && c[j + 2] == 's' && c[j + 3] == 'h' && c[j + 4] == 'i' && c[j + 5] == 'n' && c[j + 6] == 'o')
				{
					c[j + 6] = 'a';
				}
			}
		}
		cout << c << endl;
	}
}

int main()
{
	solve();
	return(0);
}