#include <iostream>
#include <cstdio>

using namespace std;

int main() {
	int n; cin >> n;

	string rect = "Hoshino";

	for (int t = 0; t < n; ++t) {
		while (1) {
			string str; cin >> str;

			for (int i = 0; i < str.size(); ++i) {
				for (int j = 0; j < rect.size() && i < str.size(); ++i, ++j) {
					if (str[i] != rect[j]) break;
					else if (j == rect.size()-1) str[i] = 'a';
				}
			}

			cout << str << " ";

			char c = getchar();
			if (c == '\r' || c == '\n') break;
		}
		cout << endl;
	}
}