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<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<strlen(a);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';
            }
        }
        printf("%s\n",a);
        for(j = 0; j < 1050; j++)a[j]=0;
        fflush(stdin);
        
    }
    return 0;
}

C++: 
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
#include<cstdio>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()


int main(void){
	string num;
	getline(cin,num);
	int n = atoi(&num[0]);
	while(n--){
		string s;
		getline(cin,s);
		rep(i,s.size()){
			if(s[i]=='H'&&s[i+1]=='o'&&s[i+2]=='s'&&s[i+3]=='h'&&s[i+4]=='i'&&s[i+5]=='n'&&s[i+6]=='o'){
				s[i+6]='a';
			}
			if(s[i]=='\n'){cout<<endl;n--;break;cout<<"test"<<n<<endl;}
			}
		cout<<s<<endl;
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

int n;
string s;

int main(){
	cin >> n;
	cin.ignore();
	while(n--){
		getline(cin, s);
		bool f = 0;
		for (int i = 0; i < s.size() - 6; i++){
			string t = s.substr(i, 7);
			if (t == "Hoshino"){
				s[i + 6] = 'a';
			}
		}
		cout << s << endl;
	}
}

C++: #include "bits/stdc++.h"
using namespace std;

int main()
{
  int n;
  cin >> n;

  while (n--){
    string str;
    getline(cin, str);
    for (int i = 0; i <= str.size(); i++){
      if (str.substr(i, 7) == "Hoshino") str[i + 6] = 'a';
      cout << str[i];
    }
    cout << endl;
  }

  return (0);
}

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