Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	stdin := bufio.NewScanner(os.Stdin)
	stdin.Scan()
	n, _ := strconv.Atoi(stdin.Text())

	for i := 0; i < n; i++ {
		stdin.Scan()
		fmt.Println(strings.Replace(stdin.Text(), "Hoshino", "Hoshina", -1))
	}
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))



LL snum[4001];
int main(){
	int N;
	cin>>N;
	vector<string>res;
	int cnt=0;
	cin.ignore();
	REP(i,N){
		
		string str;
		getline(cin,str);
		
		std::string::size_type index = str.find("Hoshino");
		while(index!=string::npos){
			str.replace(index,7,"Hoshina");
			index=str.find("Hoshino",index);
		}
		res.PB(str);
	}
	REP(i,N)cout<<res[i]<<endl;
	return 0;
}

C++: #include<stdio.h>
#include<string.h>


int main(void){

	int i,n;
	char *p;
	char a[1000];
	char word[]="Hoshino";
	scanf("%d\n",&n);
	for(i = 0;i < n;i++){
        fgets(a,sizeof(a),stdin);
        while((p = strstr(a,word))!=NULL){
            p[6] = 'a';
        }
                printf("%s",a);

    }


return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<string>
#include<cstring>

using namespace std;
  
int main(void){
    std::ios_base::sync_with_stdio(false);
  
    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=7;cnt<bun.length();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;
}

C++: #include<string>
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int N,f=0;
string st;
string S="Hoshino";
string SA="Hoshina";
cin>>N;
for(int iii=0;iii<N;iii++){
while(cin>>st){
if(f>0)cout<<" ";
if(st==S)st=SA;
cout<<st;f++;
}f=0;
cout<<endl;
}
return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

int main(void)
{
	string str;
	int n;


	cin >> n;
	while(--n,n>=0){
		getline(cin,str);

		for(int i = 0; i < str.length()-6; i++){
			if(str.substr(i,7) == "Hoshino")
				str[i+6] = 'a';
		}
		cout << str << endl;
	}
	return 0;
}

C++: #include<stdio.h>

int main(){
	char ss[1100],ho[]="Hoshino";
	int i,j,flag,n;
	scanf("%d ",&n);
	while(n--){
		fgets(ss,sizeof(ss),stdin);
		
		for(i=0;i<1006;i++){
			
			flag=0;
			for(j=0;j<7;j++){
				if(ss[i+j]!=ho[j])flag=1;
			}
			if(flag==0)ss[i+j-1]='a';
		}
		
		printf("%s",ss);
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){
	
	int n;
	string s;
	string d="Hoshina";
	cin>>n;
	getline(cin,s);
	while(n--){
		getline(cin,s);
		while(1){
			unsigned int loc = s.find("Hoshino");
			if(loc!=string::npos)
			s.replace(loc,d.size(),d);
			else
				break;
		}
		cout<<s<<endl;
	}
	
	return 0;
}

C++: #include <iostream>
#include <iterator>
#include <string>
using namespace std;
int main()
{
	bool flg;
	int n, i, c;
	string w, s;
	unsigned int x;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		c = 0;
		s = "";
		while (1)
		{
			w = "", flg = false;
			cin >> w;
			if (w == "Hoshino.")
				if ((x = w.find(".", 0)) != string::npos)
					s += "Hoshina.", flg = true;
			if (w == "Hoshino")
				s += "Hoshina", flg = true;
			if (!flg)
				s += w;
			if (cin.get() == '\n') break;
			s += " ";
		}
		s.erase(s.end(), s.end());
		cout << s << endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
int main(void)
{
	int ct,len;
	char *rp;
	char retu[1000],s[]="Hoshina";
	scanf("%d",&ct);
	fflush(stdin);
	for(int f1=0;f1<ct;f1++){
		gets(retu);
		if(rp=strstr(retu,"Hoshino")){
			len=strlen(retu);
			for(int f2=0;f2<7;f2++){
				*rp=s[f2];
				*(rp++);
			}
		}
		printf("%s\n",retu);
	}
	return 0;
}

C++: #include<string>
#include<iostream>
using namespace std;

string replaceAll(string s, string f, string t) {
  string r;
  for (int p = 0; (p = s.find(f)) != s.npos; ) {
    r += s.substr(0, p) + t;
    s = s.substr(p + f.size());
  }
  return r + s;
}

int main(){
  string s;
  int n;
  cin>>n;
  getline(cin,s);
  while(n--){
    getline(cin,s);
    cout<<replaceAll(s,string("Hoshino"),string("Hoshina"))<<endl;
  }
}

C++: ##include <iostream> 
#include <string> 

int main(){
  std::string sent;
  int gyou,num=0;
  std::cin >> gyou;
  getline(std::cin, sent);
  for(int i=0;i<gyou;++i){
    num=0;
    getline(std::cin, sent);
    std::string bef="Hoshino",aft="Hoshina";
    while(num!=-1){
      num=(int)(sent.find(bef));
      if(num!=-1){
      sent.replace(num,bef.size(),aft);
      }
    }
    std::cout << sent;
    if(i<gyou-1)
    std::cout << std::endl;
  }
  return 0; 
}

C++: #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();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;
}

C++: //#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

int main(){
	
	int n;
	cin >> n;
//	cout << n << endl;
	for(int j = 0; j<=n; j++)
	{
	
		char s[MAX_SIZE] = {};
		gets(s);
		int i = 0;
		while(*(s+i) != '\0')
		{
			//printf("%c",*(s+i));
	         	bool check = true;
			if(*(s+i) == 'H')
		         if(*(s+i+1) == 'o')
			   if(*(s+i+2) =='s' )	
				if(*(s+i+3) =='h' )
					if(*(s+i+4) == 'i')
						if(*(s+i+5) == 'n' )
						if(*(s+i+6) == 'o')
						{
							cout << "Hoshina";
							i+=7;
							check = false;
						} 
		 if(*(s+i) != 'H' || check  == true)
		{
			printf("%c",*(s+i));
			i++;
		}
			
		}	
		 if(j)cout << endl;
	}
	if(j == false)
		cout << endl;  
	return 0;

}