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>

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){
				if(english[j+7]==" "||english[j+7]=="\0")
					english[j]=true;
			}
		}
		std::cout << english;
	}
    return 0;
}

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

using namespace std;

int main(void)
{
	int n;
	string a;
	string g = "Hoshino";

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

C++: #include <iostream>
#include <string>
using namespace std;
int search(string a,int *loc){
	*loc = a.find("Hoshino",0);
	return *loc;
}
int main(){
	string a,t="Hoshina";
	int n,loc;
	cin >> n;
	getline(cin,a);
	while(n--){
		loc=0;
		getline(cin,a);
		while(~search(a,&loc)) a.replace(loc,t.length(),t);
		cout << a << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){
	
	int n;
	string s;
	string d="Hoshina";
	cin>>n;
	getline(cin,s);
	while(n--){
		getline(cin,s);
		while(1){
			unsigned int loc = s.find("Hoshino");
			if(loc!=string::npos)
			s.replace(loc,d.size(),d);
			else
				break;
		}
		cout<<s<<endl;
	}
	
}

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

        }

        cout << ret << endl;

    }

}

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

#define BAD "hoshino"

int hoge(void);

int main(){
	int n,i;
	
	cin>>n;
	for(i=0;i<n;i++){
	 hoge();
	}
	
	return 0;
}

int hoge(){
	string text;
	int i;
	
	cin>>text;
	if(7<=text.length()){
	for(i=0;i<text.length()-7;i++){
	 if(text.substr(i,7)==BAD){
	  text[i+6]='a';
	 }
	}
	}
	
	cout<<text<<endl;
	return 0;
}

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

using namespace std;
int main(){
	int n,i,j,h;
	char *p;
	char buf[1100];
	string str;
	string hit="Hoshino";
	string word="Hoshina";
	cin>>n;
	string tmp;
	getline(cin,tmp);
	for(;true;){
		string buf;
		getline(cin,buf);
		if(buf.size()==0)break;

		stringstream ss(buf);
//		cout<<"word :"<<buf<<endl;
		for(int i=0;ss >> str;i++){
			if(i)cout<<" ";
			h=str.size();
			if(str==hit)cout<<word;
			//int st=str.find(hit);
			//if(st>=0)str.replace(st,word.size(),word);
			else cout<<str;
		}
		cout<<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;
  string in;
  cin>>n;
  getline(cin,in);
  while(n--){
    string str;
    getline(cin,str);;
    if(str.size()<7){
      cout<<str<<endl;
      continue;
    }
    rep(i,str.size()-7){
      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+1] = 'a';
      }
    }
    cout<<str<<endl;
  }

}

C++: #include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <deque>
#include <algorithm>
#include <iomanip>
#include <functional>
#include <numeric>
#include <sstream>

#define REP(i, n) for(int i = 0;i < (n); i++)
#define REP2(i, x, n) for(int i = (x); i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1;i >= 0; i--)

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

#define LL long long int
#define LD long double

#define PI 3.14159265358979

using namespace std;

//================================================

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);

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

	string from = "Hoshino";
	REP(i, N) {
		string S;
		getline(cin, S);

		while(true) { 
			int res = S.find("Hoshino", 0);
			if (res == -1) break;

			S.replace(res, 7, "Hoshina");
		}
		cout << S << "\n";
	}
	return 0;
}

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 <= (int)str.size() - (int)a.size(); i++)
		{
			if (str.substr(i, a.size()) == a) str.replace(i, b.size(), b);
		}
		cout << str << endl;
	}

	return 0;
}

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();
	REP(i, 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<iostream>
#include<string>
#include<cstdio>

using namespace std;

int main(){
	string s;
	getline(cin,s);
	while(getline(cin,s),s[0]!='\0'){
		for(int i=0;i<s.size()-5;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'){
				s[i+1]='a';s[i+6]='o';
			}
		}
		
		cout<<s<<endl;
		
	}

}

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

using namespace std;

int main(){
        int n;
        scanf("%d ",&n);
        string a[n];
        for(int i=0;i<n;i++){
                getline(cin,a[i]);
                while(1){
                int index;
                index=a[i].find("Hoshino",index);
                if((int)string::npos==index)break;
                a[i][index+6]='a';
                }
        }
        for(int i=0;i<n;i++){
        cout<<a[i]<<"\n";
        }
        return 0;
}