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>
using namespace std;

int main(void){

    int n;
    cin >> n;
    cin.ignore();

`   string text,s,ret;
    string str = "Hoshino";
    string astr = "Hoshina";

    for(int i = 0; i < n; ++i) {
        getline(cin, text);
        ret = text;
        for(int j = 0; j < text.length()-6; ++j) {
            s = text.substr(j,str.length());
            if (s.compare(str) == 0) {
                ret = text.replace(j, astr.length(), astr);
                break;
            }

        }

        cout << "ans: " << ret << endl;
    }

}

C++: #include <stdio.h>
int main(){
    int n,now;
    char a[1000],c;
    while(scanf("%d\n",&n)!=EOF){
        now=0;
        while(now<n){
        if(a[0]=='H'&&a[1]=='o'&&a[2]=='s'&&a[3]=='h'&&a[4]=='i'&&a[5]=='n'&&a[6]=='o'&&a[7]=='\0')printf("Hoshina");
        else printf("%s",a);
        scanf("%c",&c);
        printf("%c",c);
            if(c=='\n')now++;
        a[7]='\0';
    }
    }
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
    string str, judge = "";
    bool bo=false;
    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++) {
            if(str[j]=='H'||bo==true){
            judge += str[j];
                bo=true;
            }
            else{
                cout<<str[j];
            }
            if (judge == "Hoshino") {
                cout << "Hoshina";
                judge = "";
                bo=false;
            }
            else if(judge.size()==7 && judge!="Hoshino"){
                cout<<judge;
                judge="";
                bo=false;
            }
        }
        cout << endl;
    }
    return 0;
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  string s;
  getline(cin,s);
  rep(i,n){
    getline(cin,s);
    while(s.find("Hoshino") != string::npos){
      s.replace(s.find("Hoshino"),7,"Hoshina");
    }
    cout << s << endl;
  }
  return 0;
}

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

int main(){
	int num;
	std::string english;
	std::cin >> num;
	for(int i=0;i<=num;++i){
		std::getline(std::cin,english);
		
		while(english.find("Hoshino") != -1){
			size_t find = english.find("Hoshino");
			english.replace(find, find+7, "Hoshina");
		}

		std::cout << english << std::endl;
	}
    return 0;
}

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

int main(void){

	int i,j,n;
	char *p;
	char a[1000];
	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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))



LL snum[4001];
int main(){
	int N;
	cin>>N;
	vector<string>res;
	int cnt=0;
	cin.ignore();
	REP(i,N){
		
		string str;
		getline(cin,str);
		
		std::string::size_type index = str.find("Hoshino");
		while(index!=string::npos){
			str.replace(index,7,"Hoshina");
			index=str.find("Hoshino",index);
		}
		res.PB(str);
	}
	REP(i,N)cout<<res[i]<<endl;
	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,word))!=NULL){
            p[6] = 'a';
        }
                printf("%s",a);

    }


return 0;
}

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

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=7;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<string>
#include<iostream>
#include<stdio.h>
using namespace std;
int main()
{
int N,f=0;
string st;
string S="Hoshino";
string SA="Hoshina";
cin>>N;
for(int iii=0;iii<N;iii++){
while(cin>>st){
if(f>0)cout<<" ";
if(st==S)st=SA;
cout<<st;f++;
}f=0;
cout<<endl;
}
return 0;
}