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 <iostream>
#include <string>

using namespace std;

int main()
{
	int num;
	string before = "Hoshino", after = "Hoshina";

	cin >> num;
	cin.get();

	for(int i = 0; i < num; i++)
	{
		string str;
		getline(std::cin, str);
		string::size_type pos;
		for(pos = str.find(before); pos != string::npos; pos = str.find(before, after.size() + pos))
		{
			str.replace(pos, before.size(), after);
		}
		cout << str << endl;
	}

	return 0;
}

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

int main(void){
    int datanum;
    char s[1001], *p;
    
    scanf("%d", &datanum);
    fgets(s,sizeof(s),stdin); // skip \n
    for (int i=0; i<datanum; i++){
        fgets(s,sizeof(s),stdin);
        s[strlen(s)-1]='\0'; // eliminate \n
        while (p = strstr(s, "Hoshino")){
            p[6] = 'a';
        }
        printf("%s", s);
    }
    
    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,"hoshino"))!=NULL){
            p[6] = 'a';
        }
                printf("%s",a);

    }


return 0;
}

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

int main(){
    int n; //dataset number
    std::string before = "Hoshino";
    std::string after = "Hoshina";

    std::cin >> n;
    std::cin.ignore();
    
    //std::vector<std::string> strList;
    
    for(int i = 0; i <= n; ++i){
        std::string str;
        std::getline(std::cin, str);
        std::string::size_type pos = str.find(before);
        while(pos != std::string::npos){
            str.replace(pos, before.size(), after);
            pos = str.find(before, pos + after.size());
        }
	std::cout << str << std::endl;
	//strList[i] = str;
    }

    /*
    for(int i = 0; i < n; ++i){
        std::cout << strList[i] << std::endl;
    }
    */
    return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
string a, b;
int n;
int main(){
	b = "Hoshina";
	cin >> n;
	for(int i = 1; i <= n; i++){
		getline(cin, a);
		if(a.find("Hoshino") != -1){
			a.insert(a.find("Hoshino"), b);
			a.erase(a.find(b)+7, 7);
		}
		cout << a << endl;
	}
	return 0;
}

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

int main()
{
	int n;
	char str[1024];

	scanf("%d ", &n);

	for (int i = 0; i < n; i++){
		fgets(str, sizeof(str), stdin);

		int len = strlen(str);
		for (int j = 0; j < len - 6; j++){
			if (strncmp(str + j, "Hoshino", 7) == 0){
				str[j + 6] = 'a';
			}
		}

		cout << str;
	}

	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) == 'a')
						{
							cout << "Hoshino";
							i+=7;
							check = false;
						} 
		 if(*(s+i) != 'H' || check  == true)
		
			printf("%c",*(s+i));
			i++;
		}
			
		}
		if(j != 0) cout << endl;
	}
	return 0;

}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int n;
	cin>>n;
	cin.get(); // ツ凝ウツ板陳づーツ偲ヲツ督セツつオツづ按つ「ツづ出ツ療債つェツつィツつゥツつオツつュツづ按づゥ
	for(int j=0; j<n; j++){
		string s;
		while(getline(cin,s)){
		string ans="";
		for(string::size_type i=0; i<s.size(); i++){
			if(s.substr(i,7) == "Hoshino"){
				ans+="Hoshina";
				i+=6;                    // ツ置ツ環キツつオツつスツ閉カツつセツつッツ進ツづ淞づゥ
			}
			else ans+=s[i];
		}
		cout << ans << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<cmath>
#include<algorithm>
#include<map>
#include<functional>
#include<queue>
#include<stack>
#include<set>
using namespace std;
int main(){
int counter;
string n;
cin>>counter;
cin.ignore();
for(int iii=0;iii<counter;iii++){
	getline(cin,n);
	string tmp="";
	for(int i=0;i<=n.size();i++){
		if(n[i]==' '||i==n.size()){
			if(tmp=="Hoshino")cout<<"Hoshina";
		else cout<<tmp;
		if(n[i]==' ')cout<<" ";
		else cout<<endl;
		tmp.clear();
		}
		else tmp.push_back(n[i]);
	}//endfor
}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    string str;vector<string> vs;
    vs.clear();
    while(cin>>str){
      cin>>str;
      if(str=="Hoshino"){
	vs.push_back("Hoshina");
      }else
	vs.push_back(str);
    }
    for(int j=0;j<vs.size();j++){
      cout<<vs[j];
      if(j!=vs.size()-1)
	cout<<" ";
    }
    cout<<endl;
  }
  return 0;
}

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

using namespace std;

int main()
{
	int n, i, j;
	ios::sync_with_stdio();
	string s;

	scanf("%d", &n); cin.get();
	for (i=0; i<n; i++) {
		getline(cin, s);
		
		for (j=0; j+6 < s.size(); j++) {
			if (s.substr(j, 7) == "Hoshino") s[j+6] = 'a';
		}
		
		cout << s << endl;
		
	}
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <string>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
    string s;
    getline(cin, s);
    int T = atoi(s.c_str());
    while (T--) {
        getline(cin, s);
        if (s.size() && s[s.size()-1] == '\r') s.resize(s.size()-1);
        size_t ix = 0;
        while ((ix = s.find("Hoshino", ix)) != string::npos) {
            s[ix+6] = 'a';
        }
        cout << s << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int rep(string a,int *loc){
	*loc = a.find("Hoshino");
	return *loc;
}
int main(){
	string a,t="Hoshina";
	int n,loc;
	cin >> n;
	getline(cin,a);
	while(n--){
		loc=0;
		getline(cin,a);
		while(!rep(a,&loc)) a.replace(loc,t.length(),t);
		cout << a << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
  int n;
  cin>>n;
  cin.ignore();
  string line;
  string s = "Hoshina";
  while((getline, line))
  {
  
    }
  cout<<"Hoshina"<<endl;
 cout<<"Hashino"<<endl;
 cout<<"Masayuki Hoshina was the grandson of Ieyasu Tokugawa."<<endl;
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	int n,index;
	cin>>n;
	cin.ignore();
	vector<string> s(n);
	for(int i=0;i<n ; ++i){
		getline(cin,s[i]);
		while(s[i].find("Hoshino",0)!=string::npos){
			index=s[i].find("Hoshino",0);
			s[i].replace(index , 7 , "Hoshina");
		}
	}
	for(int i=0;i<n;++i){
		cout << s[i] << endl;
	}
	return 0; 
}