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>
#include <cstdio>
#include <string>
#include <cstring>

using namespace std;

string str;
string hoshino = "Hoshino";
int hlen = hoshino.length();

void changeHoshino(int len) {
	for (int i = 0; i <= len - hlen; i++) {
		int j = 0;
		while ((j < hlen) && (str[i+j] == hoshino[j]))
			j++;

		if (j == hlen)
			str[i+j-1] = 'a';
	}
}
int main() {
	int n;
	
	scanf_s("%d\n", &n);
	
	for (int i = 0; i < n; i++) {
		getline(cin, str);

		changeHoshino(str.length());

		cout << str << 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::cin >> english;
		while(english.find("Hoshino") != -1){
			int find = english.find("Hoshino");
			english.replace(find, find+7, "Hoshina");
		}
		std::cout << english << std::endl;
	}
    return 0;
}

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

using namespace std;

int main(){
  int n;
  char line[1000];
  fgets(line,sizeof(line),stdin);
  sscanf(line,"%d",&n);
  char buf[1500];
  for(int i=0;i<n;i++){
    char s[1500];
    fgets(buf,sizeof(buf),stdin);
    sscanf(buf,"%[^\n]",s);
    int j=0;
    while(s[j]!='\0'){
      if(strncmp((s+j),"Hoshino",7)==0){
	s[j+6]='a';
      }
      j++;
    }
    printf("%s\n",s);
  }
  return 0;
}

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

int main() {
  string str;
  int n;
  scanf("%d\n",&n);
  for(int i=0;i<n;i++) {
    getline(cin,str);
    for(unsigned int j=0;j<str.size();j++) {
      if(str.substr(j,7) == "Hoshino") {
        str.replace(j,7,"Hoshina");
      }
    }
    cout << str << endl;
  }
}

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

int main(){
    int n;

    cin >> n;
    cin.get();
    string str;

    for(int i=1; i<=n; i++){
        getline(cin, str);
        while(str.find("Hoshino") != string::npos){
            str.at(str.find("Hoshino") + 6) = 'a';
        }
        cout << str << endl;
    }

    return 0;
}

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

int main(){
	int num;
	std::string fa = "Hoshino";
	std::string tr = "Hoshina";
	std::string english;
	std::cin >> num;

	for(int i=0;i<num;i++){
		std::cin >> english;
		for(int j=0;j<english.length();j++){
			if(english[j]==fa){
					english[j]=tr;
			}
		}
		std::cout << english;
	}
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <sstream>
#include <cstdio>

using namespace std;

int main()
{
    int n;
    string str;
    cin >> n;
    cin.get();
    for(int i=0;i<n;++i)
    {
        getline(cin, str);
        stringstream ss(str);
        str.clear();
        ss >> str;
        if(str=="Hoshino") str = "Hoshina";
        else if(str=="Hoshino.") str = "Hoshina.";
        cout << str;
        while(ss >> str)
        {
            if(str=="Hoshino") str = "Hoshina";
            else if(str=="Hoshino.") str = "Hoshina.";
            cout << ' ' << str;
        }
        cout << endl;
    }
}

C++: #include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
using namespace std;

#define rep(i,a,n) for(int (i)=(a); (i)<(n); (i)++)
#define repq(i,a,n) for(int (i)=(a); (i)<=(n); (i)++)
#define repr(i,a,n) for(int (i)=(a); (i)>=(n); (i)--)
#define all(v) begin(v), end(v)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 2000000000
#define int long long int

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define LEQ(n, m) ((n) <= (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))
#define GEQ(n, m) ((n) + EPS >= (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

int dx[]={1, -1, 0, 0};
int dy[]={0, 0, 1, -1};
int const MOD = 1000000007;
ll mod_pow(ll x, ll n) {return (!n)?1:(mod_pow((x*x)%MOD,n/2)*((n&1)?x:1))%MOD;}
int madd(int a, int b) {return (a + b) % MOD;}
int msub(int a, int b) {return (a - b + MOD) % MOD;}
int mmul(int a, int b) {return (a * b) % MOD;}
int minv(int a) {return mod_pow(a, MOD-2);}
int mdiv(int a, int b) {return mmul(a, minv(b));}

namespace std {
    bool operator<(const P& a, const P& b) {
        return a.X != b.X ? a.X < b.X : a.Y < b.Y;
    }
}

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

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

int main()
{
    int WordQuantity = 0,totalcnt = 0,alf = 0;
    char Hoshino[8] = {"Hoshino"};
    char Hoshina[8] = {"Hoshina"};
    int n;
 
    scanf("%d",&n);
    fflush(stdin);
 
    for(int loop = 0; loop < n; loop++){
        char words[1000][1001];
        char text[1001];
        totalcnt = 0;
 
        gets(text);
        fflush(stdin);
 
        for(WordQuantity = 0; totalcnt < strlen(text); WordQuantity++){
            for(alf = 0; text[totalcnt] != ' ' && totalcnt < strlen(text); alf++){
                words[WordQuantity][alf] = text[totalcnt];
                totalcnt++;
            }
            words[WordQuantity][alf] = '\0';
            totalcnt++;
        }
 
        for(int i = 0; i < WordQuantity; i++){
            if(strcmp(words[i],Hoshino) == 0){
                strcpy(words[i],Hoshina);
            }
        }
 
        for(int i = 0; i < WordQuantity-1; i++){
            printf("%s ",words[i]);
        }
        printf("%s\n",words[WordQuantity-1]);
 
    }
 
    return 0;
}

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

string HOSHINOtoHOSHINA(string str) {
  string str2(str);
  int idx = 0;
  int len = 7; // "Hoshina" has 7 character
  while( (idx = str2.find("Hoshino", idx)) >= 0) {
	str2.replace(idx, len, "Hoshina");
  }
  return str2;
}

int main() {
  int n;
  string buf;

  cin >> n;
  cin.ignore();
  
  for(int i = 0; i < n; ++i) {
	getline(cin, buf);
	cout << HOSHINOtoHOSHINA(buf) << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
using namespace std;
 
const int MAX= 10000100;

#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()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int n;
  cin>>n;
  cin.ignore();
  while(n--){
    string s,t,u;
    getline(cin,s);
    t = "Hoshino";
    u = "Hoshina";
    for(int i = 0 ; i < s.size() ; i ++){
      if(s.substr(i,t.size()) == t){
	cout<<u;
	i+= t.size() - 1 ;
      }else{
	cout<<s[i];
      }
    }
    cout<<endl;
  }

}