#include<cstdio>
#include<iostream>
#include<string>
 
using namespace std;
 
int main(void){
 
    int n;
    string bun;
	char inp;
 
    cin>>n;
    getchar();
    for(int i=0;i<n;i++){
		bun=("");
       while(1){
		   inp=getchar();
		   if(inp=='\n') break;
		   bun+=inp;
	   }
	   for(int cnt=6;cnt<bun.length()-1;cnt++){
           if(bun[cnt]=='o'&&bun[cnt-1]=='n'&&bun[cnt-2]=='i'&&bun[cnt-3]=='h'&&bun[cnt-4]=='s'&&bun[cnt-5]=='o'&&bun[cnt-6]=='H') bun[cnt]='a';
	   }
       cout<<bun<<endl;
    }
 
    return 0;
}