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 <iostream>
#include <string>
using namespace std;

const string a = "Hoshino";
const string b = "Hoshina";
int n;
string str;

int main()
{
	cin >> n;
	cin.get();
	while (n--)
	{
		getline(cin, str);
		for (int i = 0; i <= str.size() - a.size(); i++)
		{
			if (str.substr(i, a.size()) == a) str.replace(i, b.size(), b);
			else if (str.substr(i, b.size()) == b) str.replace(i, a.size(), a);
		}
		cout << str << endl;
	}

	return 0;
}

C++: #include<stdio.h>
#include<string.h>
int main()
{
	char str[1024],*p;
	int n;
	
	scanf("%d", &n);
	getchar();
	while(n--)
	{
		fgets(str,1024,stdin);
		p = str;
		for(;;)
		{
			p = strstr(p,"Hoshino");
			if(!p)
				break;
			p[6] = 'a';
			p += 7;
		}
		printf("%s", str);
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int n;
  cin>>n;
  cin.ignore();
  rep(j,n){
    string s;
    getline(cin,s);
    size_t n;
    while(n=s.find("Hoshino"),n!=string::npos)s[n+6]='a';
    //rep(i,s.size()-6)if(s.substr(i,7)=="Hoshino")s.replace(i,7,"Hoshina");
    cout<<s<<endl;
  }


}

C++: #include <iostream>

using namespace std;
int main(){
	int d;
	cin>>d;
	string buf;
	string key="Hoshino";
	string newkey="Hoshina";
	unsigned int p;
getline(cin,buf);
	while(d--){
		getline(cin,buf);
		while((p=buf.find("key"))!=string::npos){
			buf.replace(p,key.size(),newkey);
		}
		cout<<buf<<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]==false) english[j]=true;
		}
		std::cout << english;
	}
    return 0;
}

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

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[500][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 <bits/stdc++.h>

using namespace std;

string allReplaceString(string s, string f, string t) {
	string r;
	for (int p=0; (p = s.find(f)) != s.npos;) {
		r += s.substr(0, p) + t;
		s = s.substr(p + f.size());
	}
	return r + s;
}

int main() {
	string line;
	int n;
	cin >> n;
	cin.ignore();
	
	for (int i = 0; i < n; i++) {
		getline(cin, line);
		string ans = allReplaceString(line, "Hoshino", "Hoshina");
		cout << ans << endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
int main() {
	string s;
	int n; cin >> n;
	getline(cin, s);
	for (int j = 0; j < n; j++){
		getline(cin, s);
		for (int i = 0; i < s.size(); i++) {
			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') {
				cout << "Hoshina";
				i += 6;
			}
			else cout << s[i];
		}
		cout << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
using namespace std;
#define INF	100000000
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define lb lower_bound
#define ub upper_bound
#define SS stringstream
#define rep(i,n) for(int i = 0; i < n; i++)
#define sz(x) ((int)(x).size())
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).begin(), (x).end(), greater<int>() )
#define clr(a,b) memset((a),(b),sizeof(a))
typedef long long int ll;
typedef pair<int, int> P;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<P> Vp;
typedef priority_queue<P, vector<P>, greater<P> > PQ;

int n;
string str;

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<time.h>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
int main(){
	int n;
	cin>>n;
	string s;
	getline(cin,s);
	while(n--){
		getline(cin,s);
		if(s.size()>6)rep(i,s.size()-6)if(s.substr(i,7)=="Hoshino")s[i+6]='a';
		cout<<s<<endl;
	}
}

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

int main() {
  int n;
  size_t o;
  string line;
  cin >> n;
  getline(cin, line);
  for (int i=0; i<n; i++) {
    getline(cin, line);
    o = 0;
    while (1) {
      o = line.find("Hoshino", o);
      if (o == string::npos) break;
      line.replace(o, 7, "Hoshina");
    }
    cout << line << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	int n; cin >> n ;
	while(--n){
		string str; int cnt=0;
		while( cin >> str ){
			
			if(cnt++) cout << ' ' ;
			if(str=="Hoshino") str="Hoshina";
			cout << str ;
		};
		cout << '\n' ;
	};
}

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


int main(void){

	int i,n;
	char *p;
	char a[1002];
	//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 <cstdio>
#include <string>
#include <iostream>

int main(){
	int n;
	std::cin>>n;
	while(--n){
		std::string s;
		std::getline(std::cin,s);
		while(s.find("Hoshino",0) != std::string::npos){
			s[s.find("Hoshino")+6]='a';
			//std::cout<<s.find("Hoshino")<<std::endl;
		}
		std::cout<<s<<std::endl;
	}
	return 0;
}