#include <bits/stdc++.h>
using namespace std;

int main(void){
	int n,i,j;
	char a[55];
	cin >> n;
	getchar();
	for(j=0; j<n; j++){
		i = 0;
		while(true){
			a[i] = getchar();
			if(a[i]=='\n'){
				putchar('\n');
				break;
			}else if(a[i]=='o' && i > 6){
				if(a[i-6] == 'H' && a[i-5] == 'o' && a[i-4] == 's' && a[i-3] == 'h' && a[i-2] == 'i' && a[i-1] == 'n'){
					putchar('a');
				}else{
					putchar(a[i]);
				}
			}else{
				putchar(a[i]);
			}
			i++;
		}
	}
	return 0;
}