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 <sstream>
#include <iostream>
#include <array>

int main(){
    int line_num = 0;
    std :: string ori_sentence, new_sentence, word;
    std :: cin >> line_num;
    std :: getline(std :: cin, ori_sentence);
    for(int i = 0;i <= line_num;i++){
        std :: getline(std :: cin, ori_sentence);
        std :: stringstream ss(ori_sentence);
        new_sentence = "";
        while(std :: getline(ss, word, ' ')){
            if(word == "Hoshino"){
                word = "Hoshina";
            }
            if(new_sentence != ""){
                new_sentence += (' ' + word);                
            } else {
                new_sentence += word;                
            }
        }
        std :: cout << new_sentence << std :: endl;
    }
}

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

int main()
{
    const std::string str_false = "Hoshino";
    const std::string str_true = "Hoshina";

    u_int num_of_data;
    std::string text;
    std::cin >> num_of_data;
    std::cin.ignore();
    
    for(u_int i = 0; i < num_of_data; ++i){
        getline(std::cin, text);
        int index =  0;
        
        while((index = text.find(str_false, index)) != -1)
            text.replace(index, str_false.size(), str_true);
        std::cout  << text << std::endl;
    }
    
    return 0;
}

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

int main(){
	std::string f="Hoshino";
	std::string fa="Hoshina";
	std::string a;
	int n;
	std::cin>>n; std::cin.ignore(); 
	for(int j=0;j<n;j++){
		getline(std::cin,a);
		std::string::size_type index=a.find(f);
		while(index!=std::string::npos){
			for(int i=0;i<f.size();i++){
				a[i+index]=fa[i];
			}
			index=a.find(f);
		}
		std::cout<<a<<std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>

using namespace std;

int main(void){
	int n;
	int a,b;
	int s;
	string str;
	cin >> n;
	getline(cin,str);
	for(a=0;a<n;a++){
		getline(cin,str);
        s=str.size();
		for(b=0;b<s;b++){
			if(str[b]=='H' && str[b+1]=='o' && str[b+2]=='s' && str[b+3]=='h' && str[b+4]=='i' && str[b+5]=='n' && str[b+6]=='o')str[b+6]='a';
		}
		cout << str << 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 <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>

int main(){
    int data_set_num;
    std::string str;
    std::string from = "Hoshino";
    std::string to = "Hoshina";

    std::cin >> data_set_num;

    while(data_set_num--){
        std::getline(cin,str);
        string::size_type pos = str.find(from);
        while(pos != string::npos){
            str.replace(pos, from.size(), to);
            pos = str.find(from, pos + to.size());
        }
        std::cout << str << std::endl;
    }

    return 0;
}

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

using namespace std;

int main() {
	int b;
	cin >> b;
	string a;
	getline(cin, a);
	for (int i = 0; i < b; i++) {
		getline(cin, a);
		string::size_type index = a.find("Hoshino");
		while (index != string::npos) {
			a.replace(index, 7, "Hoshina");
			index += 7;
			index = a.find("Hoshino", index);
		}
		cout << a << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main()
{
	int n;
	cin>>n;
	cin.ignore();
	while(n--) 
	{
		string in;
		int pos;
		getline(cin,in);
		pos=in.find("Hoshino");
		while(pos!=-1) 
		{
			in[pos]='H'; in[pos+1]='o'; in[pos+2]='s';
			in[pos+3]='h'; in[pos+4]='i'; in[pos+5]='n'; in[pos+6]='a';
			pos=in.find("Hoshino");
		}
		cout<<in<<endl;
	}
  return 0;
}

C++: #include <iostream>
#include <string>
 
int main(void) {
  int n;
  std::string str;
  std::string::size_type id;
   
  std::cin >> n;
  std::cin.ignore();
  for(int i=0; i<n; i++) {
    getline(std::cin, str);
    while((id = str.find("Hoshino")) != std::string::npos) {
        str[id+6] = 'a';
    }
    std::cout << str << std::endl;
  }
  return 0;
}

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

int main()
{
	int n;
	cin >> n;
	cin.ignore();
	rep(i,n)
	{
		string s;
		getline(cin,s);

		rep(j,s.length()-6)
		{
			if(s[j] == 'H' && s[j+1] == 'o' && s[j+2] == 's' && s[j+3] == 'h' && s[j+4] == 'i' && s[j+5] == 'n' && s[j+6] == 'o')
			{
				s[j+6] = 'a';
			}
		}

		cout << s << 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);
        while((s.find("Hoshino")!= -1)){
            s.replace(s.find("Hoshino"),7,"Hoshina");
            //replace(??????,??????????????°,???????????????)
        }
        cout<<s<<endl;
    }
    
    return 0;
}