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 "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;
const ld eps=1e-9;

//// < "D:\D_Download\Visual Studio 2015\Projects\programing_contest_c++\Debug\a.txt"

//  ????????????????????????
std::string Replace(std::string String1, std::string String2, std::string String3)
{
	std::string::size_type  Pos(String1.find(String2));

	while (Pos != std::string::npos)
	{
		String1.replace(Pos, String2.length(), String3);
		Pos = String1.find(String2, Pos + String3.length());
	}

	return String1;
}

int main() {
	int N; cin >> N;
	string st;
	getline(cin, st);
	while (N--) {
		getline(cin, st);
		st = Replace(st, "Hoshino", "Hoshina");
		cout << st << endl;
	}
	return 0;
}

C++: import java.util.*;

class Main{
	public static void main(String args[]){
		Scanner s=new Scanner (System.in);
		
		int n=s.nextInt();
		s.nextLine();
		for(int j=0;j<n;j++){
			char c[]=s.nextLine().toCharArray();
			for(int i=0;i<c.length-6;i++){
				if(c[i]=='H'&&c[i+1]=='o'&&c[i+2]=='s'&&c[i+3]=='h'&&c[i+4]=='i'&&c[i+5]=='n'&&c[i+6]=='o'){
					c[i+6]='a';
					i+=6;
				}
			}
			System.out.println(new String(c));
		}
	}
}

C++: #include<cstdio>
#include<iostream>
#include<string>
 
using namespace std;
 
int main(void){
    std::ios_base::sync_with_stdio(false);
 
    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<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string.h>
#include<math.h>
#include<cstring>
using namespace std;
char text[1001];
int main(){
    int i,ii,j,n,a;
    cin>>n;   
    for(i=0;i<n;i++){
		while(gets(text)){a=strlen(text);
		    for(j=0;j<a-6;j++){
		       if(text[j]=='H'&&text[j+1]=='o'&&text[j+2]=='s'&&text[j+3]=='h'&&text[j+4]=='i'&&text[j+5]=='n'&&text[j+6]=='o'){
                    text[j+6]='a';j+=6;
               }
            }
            cout<<text<<endl;
        }
    }

    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
using namespace std;

int main(){
	int N;
	cin>>N;
	while(N--){
		char S[1001];
		fflush(stdin);
		fgets(S,1000,stdin);
		for(int i=0;S[i]!='\0';i++){
			if(strncmp(S+i,"Hoshino",7)==0){
				printf("Hoshina"); i += 6;
			}
			else printf("%c",S[i]);
		}
	}
    return 0;
}

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

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

	scanf("%d", &n);
	for (int i = 0; i < n+1; i++) {
		fgets(str, 1000, stdin);

		if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
		printf("%s\n", str);
	}

	return 0;
}

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

C++: #include<stdio.h>
#include<string.h>
int main()
{
	int len;
	int i,j,k,n;
	int count=0;
	char name[]="Hoshino";
	char word[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		//fflush(stdin);
		gets(word);
		len=strlen(word);
		for(j=0;j<len;j++)
		{
			if(word[j]=='H')
			{
				for(k=0;k<7;k++)
				{
					if(word[j+k]==name[k])
						count++;
				}
				if(count==7)
				{
					word[j+6]='a';
				}
				count=0;
			}
		}
		printf("%s\n",word);
	}
	return 0;
}

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

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

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

using namespace std;

string s;

signed main()
{
    while( s != "\n" )
    {
        cin >> s;
        if (s == "Hoshino" )
        {
            cout << "Hoshina" << ' ';
        }
        else
        {
            cout << s << ' ';
        }
    }
    return 0;
}

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

int main(){
	int dataN,i,j,tmp;
	string str;
	
	cin>>dataN;
	for(j=0;j<dataN;j++){
	 cin>>str;
	 while(1){
	  tmp=str.find("Hoshino");
	  if(tmp==-1){break;}
	  str[tmp+6]='a';
	 }
	 cout<<str<<endl;
	}
	
	return 0;
}

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

int main(void)
{
	int n;
	string a;

	cin >> n;
	cin.ignore();

	for (int i = 0; i < n; ++i){
		int x = 0;
		getline(cin, a);
		if ((x = a.find("Hoshino")) >= 0)
			a.replace(x, strlen("Hoshino"), "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	string str, judge = "";
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		if (i == 0) { getline(cin, str); }
		getline(cin, str);
		for (int j = 0; j < str.size(); j++) {
			judge += str[j];
			if(str[j] < 'A' && str[j] > 'z' || str[j]==' ' ||judge[0]!='H' ){
				cout << judge;
				judge = "";
			}
			if (judge == "Hoshino") {
				cout << "Hoshina";
				judge = "";
			}
			else if (j == str.size() - 1) {
				cout << judge;
				judge = "";
			}
		}
		cout << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	
	cin.tie( 0 );
	ios::sync_with_stdio( false );
	
	int n;
	cin >> n;
	cin.ignore(); //<-----!!!!!!!!!!
	string s;
	
	while( getline( cin, s ) ){
		
		auto found = s.find( "Hoshino" );
		
		if( found != string::npos ){
			s.replace( found, 7, "Hoshina" );
			cout << s << endl;
		}else{
			cout << s << endl;
		}
	}
	return 0;
}

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 << std::endl;
  }
  return 0; 
}

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

using namespace std;

int main() {

  int n;
  string str;

  cin >> n;
  getline(cin,str);

  for(int i=0;i<n;i++) {

    getline(cin,str);

    while(str.find("Hoshino")!=string::npos) {

      str.replace(str.find("Hoshino"),7,"Hoshina");

    }

    cout << str << endl;

  }

  return 0;

}

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

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