#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
int main() {
	int n;
	cin >> n;
	char *ho = "Hoshino";
	rep(i,n+1) {
		char c, s[2010];
		rep(j, 2000) {
			scanf("%c", &c);
			if(c == '\n') {
				s[j] = '\0';
				break;
			} else {
				s[j] = c;
			}
		}
		for(int j = 0; s[j] != '\0'; ++j) {
			int f = 1;
			rep(k,7) {
				if(s[j + k] != ho[k]) {
					f = 0;
					break;
				}
			}
			if(f) s[j + 6] = 'a';
		}
		if(i != 0) {
			printf("%s",s);
			cout << endl;
		}
	}
	return 0;
}
#include <stdio.h>
#include <string>
#include <iostream>

using namespace std;

int main(int argc, char const* argv[])
{
	string find_str("Hoshino"),rep_str("Hoshina"),target;
	int n;

	cin >> n;
	getchar();

	for( int i = 0;i < n;i++ ){
		getline(cin,target);
		for( string::size_type pos = target.find( find_str ); pos != string::npos; pos = target.find( find_str, rep_str.size() + pos ) ){
			target.replace( pos, find_str.size(), rep_str ); 
		}
		cout << target << endl;
	}
	return 0;
}