Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	var n int
	fmt.Scanf("%d", &n)

	result := make([]string, n, n)

	for i := 0; i < n; i++ {
		scanner.Scan()
		input := scanner.Text()

		result[i] = strings.Replace(input, "Hoshino", "Hoshina", -1)
	}

	for _, v := range result {
		fmt.Println(v)
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
using namespace std;
#define INF	100000000
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define lb lower_bound
#define ub upper_bound
#define SS stringstream
#define rep(i,n) for(int i = 0; i < n; i++)
#define sz(x) ((int)(x).size())
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).begin(), (x).end(), greater<int>() )
#define clr(a,b) memset((a),(b),sizeof(a))
typedef long long int ll;
typedef pair<int, int> P;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<P> Vp;
typedef priority_queue<P, vector<P>, greater<P> > PQ;

int n;
string str;

int main(){
	cin >> n;
	cin.ignore();
	rep(i,n){
		getline(cin,str);
		rep(j,str.size()-6){
			if(str[j]=='H'&&str[j+1]=='o'&&str[j+2]=='s'&&str[j+3]=='h'&&str[j+4]=='i'&&str[j+5]=='n'&&str[j+6]=='o'){
				str[j+6]='a';
			}
		}
		cout << str << endl;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int n,i;
  scanf("%d ",&n);
  while(n--){
    string s;
    for(getline(cin,s),i=0;i<s.size();i++){
      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')s[i+6]='a';
    }
    cout<<s<<endl;
  }
}

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

using namespace std;

int main(){

	int n;
	cin>>n;
	int cnt=0;
	string str;
	getline(cin,str);
	while(getline(cin,str)){
		string nstr;
		int prvIdx=0;
		bool start=false;
		for(int i = 0; i < str.size(); i++){
			if(i==str.size()-1){
				if(!start){
					nstr+=str[i];
				}
				else{
					string ss=str.substr(prvIdx,i-prvIdx+1);
					if(ss=="Hoshino"){
						nstr+="Hoshina";
					}
					else
						nstr+=ss;
				}
				//if(!((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z'))){
				//	nstr+=str[i];
				//}
			}
			else if(((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z'))){
				if(!start){
					start=true;
					prvIdx=i;
				}
			}
			else{
				if(start){
					string ss=str.substr(prvIdx,i-prvIdx);
					if(ss=="Hoshino"){
						nstr+="Hoshina";
					}
					else{
						nstr+=ss;
					}
					start=false;
				}
				nstr+=str[i];
			}

			//if(i==str.size()-1){
			//	string ss=str.substr(prvIdx,str.size()-prvIdx);
			//	if(ss=="Hoshino"){
			//		nstr+="Hoshina";
			//	}
			//	else
			//		nstr+=ss;
			//}
			//else if(!((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z'))){
			//	string ss=str.substr(prvIdx,i-prvIdx);
			//	if(ss=="Hoshino"){
			//		nstr+="Hoshina";
			//	}
			//	else
			//		nstr+=ss;
			//	nstr+=str[i];
			//	prvIdx=i+1;
			//}
		}
		cout<<nstr<<endl;
	}

	return 0;
}

C++: #include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <vector>
#include <utility>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define rep(i,n) for(int i=0; i<(n); i++)
#define repc(i,s,e) for(int i=(s); i<(e); i++)
#define pb(n) push_back((n))
#define mp(n,m) make_pair((n),(m))
#define all(r) r.begin(),r.end()
#define fi first
#define se second

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<ll> vl;
typedef vector<vl> vll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;







int main() {
	int n, l;
	string s, t = "Hoshino";
	cin >> n;
	cin.ignore();
	for (int i = 0; i < n; i++) {
		getline(cin, s);
		l = 0;
		while (1) {
			l = s.find(t, l);
			if (l == string::npos)break;
			//cout << l << endl;
			s[l + 6] = 'a';
			l += 6;
		}
		cout << s << endl;
	}
}

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

using namespace std;

int main(void){
	int n;
	cin >> n;
	cin.ignore();
	for(int i=0;i<n;i++){
		string S;
		getline(cin,S);
		string::iterator it=S.begin();
		while(S.find("Hoshino") != -1 ){
			S.replace(S.find("Hoshino"),7,"Hoshina");
		}
		cout << S << endl;
	}
	return 0;
}

C++: 
#include <iostream>
#include<string>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    string str;
    int n;
    cin>>n;
    getline(cin,str);
    for(int i=0;i<n;i++){
        getline(cin,str);
        for(int j=0;j<str.size();j++){
            if(str[j]=='o'){
                if(str[j-1]=='n'){
                    if(str[j-2]=='i'){
                        if(str[j-3]=='h'){
                            if(str[j-4]=='s'){
                                if(str[j-5]=='o'){
                                    if(str[j-6]=='H'){
                                        str[j]='a';
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        for(int i=0;i<str.size();i++){
            if(i==str.size()-1){
                cout<<str[i]<<endl;
            }else cout<<str[i];
        }
    }
    return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define LOOP(i) while(i--)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

string ReplaceString(string S,string Q,string R){
	string::size_type pos(S.find(Q));

	while(pos!=string::npos){
		S.replace(pos,Q.length(),R);
		pos = S.find(Q,pos+R.length());
	}

	return S;
}

int main(){
	//cin.tie(0);
	//ios::sync_with_stdio(false);
	
	int N;
	scanf("%d\n",&N);
	LOOP(N){
		char str[1001];
		cin.getline(str,sizeof(str));
		string S(str);
		
		S = ReplaceString(S,"Hoshino","Hoshina");
		out(S);
	}
	
	return 0;
}

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

int main(){
	int n;
	std::cin>>n;
	for(int i=0;i<n;++i){
		std::string s;
		std::getline(std::cin,s);
		while(s.find("Hoshino") != std::string::npos){
			s[s.find("Hoshino")+6]='a';
			//std::cout<<s.find("Hoshino")<<std::endl;
		}
		std::cout<<s<<std::endl;
	}
	return 0;
}

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

using namespace std;

int main(void)
{
	string str;
	string::size_type index;
	int num;
	int number;
	int i,j;

	cin >> num;
	getline(cin,str);//ツ催渉可づ個づ「ツづつつセツつッツ禿づ敖債楪づ慊つケ
	for(i=0;i<num;i++)
	{
		getline(cin,str);
		number = 0;
		while((index = str.find("Hoshino") ) != string::npos)
		{
			str.replace(index,7,"Hoshina");
		}
		cout << str << endl;
	}
	return 0;
}