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

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

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

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

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

#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())

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

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

#define CLR(a) memset((a), 0 ,sizeof(a))

#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int dx[8] = {-1, 0, 1, 0, -1, -1, 1, 1};
int dy[8] = {0, -1, 0, 1, -1, 1, -1, 1};

int main() {
  int n;
  string s;

  cin >> n;
  getline(cin, s);
  REP(i, n) {
    getline(cin, s);
    while(1) {
      string::size_type index = s.find("Hoshino");
      if(index == string::npos) break;
      else s.replace(index, 7, "Hoshina");
    }
    cout << s << endl;
  }
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
int n,s;
string str;
	scanf("%d\n",&n);
for(int i=0;i<n;i++){
	getline(cin,str);
	s=str.size();
for(int j=0;j<s-6;j++){
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;
}
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::string text;
    std::cin >> num_of_data;
    std::cin.ignore();
    
    for(u_int i = 0; i < num_of_data; ++i){
        getline(std::cin, text);
        int index = 0;
        
        while((index = text.find(str_false, index)) != (int)std::string::npos)
            text.replace(index, str_false.size(), str_true);
        std::cout  << text << std::endl;
    }
    
    return 0;
}

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

int main(){
  cin>>n;
  getline(cin,str);
  while(n--){
    getline(cin,str);
    for(int i=0;i<(int)str.size()-6;i++){
      if(str.substr(i,7)=="Hoshino"){
	str.replace(i,7,"Hoshina");
      }
    }
    cout<<str<<endl;
  }
  return 0;
}

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

using namespace std;

char str[1001];
char hoshino[] = "Hoshino";
int hlen = strlen(hoshino);

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;

	cin >> n;
	
	fgets(str, 1001, stdin);
	for (int i = 0; i < n; i++) {
		fgets(str, 1001, stdin);

		changeHoshino(strlen(str));

		cout << str;
	}

	return 0;
}

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

using namespace std;

int main()
{
	int a;
	char str[100];
	char str2[100][1000];
	
	cin >> a;
	
	for(int i = 0; i < a; i++){
		fgets(str2[i],1000,stdin);

		for(int j = 0; str2[i][j] != '\n'; j++){
			if(str2[i][j] == 'H' && str2[i][j+1] == 'o' && str2[i][j+2] == 's' && str2[i][j+3] == 'h' && str2[i][j+4] == 'i' && str2[i][j+5] == 'n' && str2[i][j+6] == 'o'){
				str2[i][j+6] = 'a';
			}
				
		}
		printf("%s",str2[i]);
	}

}

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

int main(void) {
  int n;
  string str;
  
  cin >> n;
  cin.ignore();
  while(n--) {
    getline(cin, str);
    for(int i=0; i<str.size(); i++) {
      if(str.substr(i, 7) == "Hoshino") str[i+6] = 'a';
    }
    cout << str << endl;
  }
  
  return 0;
}

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

using namespace std;

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

int main(){
	string hosino = "Hosino";
	string hosina = "Hosina";
	int tSup;
	cin >> tSup;
	cin.ignore();
	REP(t,tSup){
		string x;
		getline(cin,x);
		while(true){
			int i = x.find(hosino,0);
			if(i==string::npos){break;}
			x.replace(i,hosino.length(),hosina);
		}
		cout << x << endl;
	}
	return 0;
}

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

int main(){
	int n;
	string line;
	scanf("%d ",&n);
	
	for(int x=0;x<n;x++){
		getline(cin,line);
		while (line.find("Hoshino") != string::npos) {
			line.replace(line.find("Hoshino"), 7, "Hoshina");
		}
		cout << line << 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;
	cin.ignore();
	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>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
#include <deque>
#include <stdio.h>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define RREP(i,n) for(int (i)=(int)(n)-1;i>=0;i--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define LBOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
#define UBOUND(Itr,val) upper_bound((Itr).begin(),(Itr).end(),(val))
typedef long long ll;

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

C++: #include <iostream>
#include <cstring>
using namespace std;
int main()
{
	int n, i, j, k, c, x;
	char s[1001], r[1001], t[8] = "Hoshino";
	cin >> n;
	cin.ignore('\n');
	for (i = 0; i < n; i++)
	{
		cin.getline(s, sizeof(s));
		c = 0;
		for (j = 0; j < strlen(s); j++)
		{
			r[c] = s[j];
			c++;
			if (s[j] == 'H')
			{
				for (k = j+1, x = 0; k < j+7; k++, c++)
				{
					if (s[k] == t[k-j])
					{
						if (k == j+6)
							r[c] = 'a';
						else
							r[c] = t[k-j];
						x++;
					}
					else
					{
						r[c] = s[k];
						break;
					}
				}
				j+=x;
			}
		}
		r[strlen(s)] = '\0';
		cout << r << endl;
	}
}