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 <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;

}

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

#define BAD "hoshino"

int main(){
	int n,i;
	
	cin>>n;
	for(i=0;i<n;i++){
	 hoge();
	}
	
	return 0;
}

int hoge(){
	string text;
	int i;
	
	cin>>text;
	for(i=0;i<text.length();i++){
	 if(text.substr(i,BAD.length())==BAD){
	  text[i+BAD.length()-1]='a';
	 }
	}
	
	cout<<text<<endl;
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
  int n;
  cin >>n;
  cin.ignore();
  while(n--){
    string s;
    getline(cin,s);
    for(;;){
      string::size_type x = s.find("Hoshino");
      if(x == string::npos){break;}
      s[x+6] = 'a';
    }
    cout <<s<<endl;
  }
  return 0;
}

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

using std::string;

int main () {
  int n;
  string str;

  std::cin >> n;
  std::cin.ignore();
  
  for (int i = 0; i < n; i++) { 
    std::getline(std::cin, str);

    size_t pos;
    while ((pos = str.find("Hoshino")) != string::npos) {
      str[pos+6] = 'a';
    }
    
    std::cout << str << std::endl;
  }
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

string s;

int main(){
	getline(cin,s);
	while(getline(cin,s)){
		int a=s.find("Hoshino");
		while(a!=string::npos){
			s=s.substr(0,a)+"Hoshina"+s.substr(a+7);
			a=s.find("Hoshino");
		}
		cout<<s<<endl;
	}
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <bitset>
#include <complex>
using namespace std;
 
const double EPS = 1e-9;
const double PI = 3.14159265359;
 
typedef complex<double> P;

typedef long long int li;

int main(){
	int n;
	string hos = "Hoshino";

	cin >> n;
	cin.ignore();
	while(n--){
		string s;
		getline(cin, s);

		for(int i = 0; i < s.size()+1-hos.size(); i++){
			if(s.substr(i, hos.size()) == hos){
				s[i+hos.size()-1] = 'a';
			}
		}

		cout << s << endl;
	}

    return 0;
}

C++: #include<stdio.h>
#include<string.h>
char a[1050]={0};
int main()
{
    int i,j,k,n;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        fflush(stdin);
        scanf("%[^\n]",a);
        fflush(stdin);
        for(j=0;j<1010;j++)
        {
            if(a[j]=='H'&&a[j+1]=='o'&&a[j+2]=='s'&&a[j+3]=='h'&&a[j+4]=='i'&&a[j+5]=='n'&&a[j+6]=='o')
            {
                a[j+6]='a';
            }
        }
        for(int i=0;i<1050;i++)if(a[i]!=0)printf("%c",a[i]);
        for(int i=0;i<1050;i++)a[i]=0;
        puts("");
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;main(){int N;string S,T="Hoshino";cin>>N;for(int i=0;i<N;i++){getline(cin,S);while(S.find(T)!=-1){S.replace(S.find(T),S.find(T)+7,"Hoshina");}cout<<S<<"\n";}}