#include<cstdio>
#include<iostream>
#include<string>
 
using namespace std;
 
int main(void){
    std::ios_base::sync_with_stdio(false);
 
    int n,cnt;
    string inp,bun;
 
    cin>>n;
    getchar();
    for(int i=0;i<n;i++){
        bun=("");
        cnt=0;
        while(1){
            inp=getchar();
            if(inp[0]=='\n') break;
            bun+=inp;
            if(cnt>=6){
                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';
            }
            cnt++;
        }
        cout<<bun<<endl;
    }
 
    return 0;
}