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<bits/stdc++.h>
using namespace std;

int main(){
  int n;
  string key="Hoshino";
  cin>>n;cin.ignore();
  for(int i=0;i<n;i++){
    string str;
    int j=0,k=0;
    getline(cin,str);
    while(str[j]!=0){
      if(key[k]==str[j])k++;
      else k=0;
      if(k==7){
	str[j]='a';
	k=0;
      }
      j++;
    }
    cout<<str<<endl;
  }
  return 0;
}

C++: #include <iostream>

int main(){
    int data_set_num;
    std::cin >> data_set_num;
    std::string word;
    while(std::cin >> word){
        if(word == "Hoshino"){
            word = "Hoshina";
        }
        std::cout << word << " ";
    }
    return 0;
}

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

int main()
{
    string str[1099];
    string s;
    int test,k;
    char ch;

    cin>>test;
    cin.ignore();

    while(test--)
    {
        k=0;
        while(cin>>s)
        {
            if(s==" ")
                continue;

            str[k]=s;
            ch=getchar();
            if(ch=='\n')
                break;
            k++;
        }

        for(int i=0; i<=k; i++)
        {
            if(str[i]=="Hoshino")
                str[i]="Hoshina";
        }

        for(int i=0;i<=k;i++)
            cout<<str[i]<<" ";
        cout<<endl;

       // memset(str,'\0',sizeof(str));
    }
    return 0;
}

C++: #include<stdio.h>
#include<string.h>
 
int main(){
 
  char str[1002],ho[]="Hoshino";
  int n,i;
  char *a;
 
  scanf("%d\n",&n);
  for(i=0;i<n;i++)
    {
      fgets(str,sizeof(str),stdin);
      while((a=strstr(str,ho)) != NULL)
    {
      a[6] = 'a';
    }
      printf("%s",str);
    }
  return 0;
}

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

int main(){
  std::string sent;
  int gyou,num;
  std::cin >> gyou;
  getline(std::cin, sent);
  for(int i=0;i<gyou;i++){
    getline(std::cin, sent);
    std::string bef="Hoshino",aft="Hoshina";
    num=sent.find(bef);
    if(num!=-1)
    sent.replace(num,bef.size(),aft);
    std::cout << sent;
    if(i<gyou-1)
    std::cout << std::endl;
  }
  return 0; 
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	int n,i;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		string str;
		getline(cin,str);
		string::size_type pos;
		for(pos = str.find("Hoshino"); pos != string::npos; pos = str.find("Hoshino",pos+7)){
			str.replace(pos,7,"Hoshina");
		}
		cout<<str<<endl;
	}
	return 0;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>
#include <string>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return 0;
	}
#endif
	/*****変数置き場*****/
	string words;
	int n;
	int index;
	/*****処理部*****/
	cin >> n;
	for(int i=0;i<n;i++){
		getline(cin,words);
		//cin >> words;
		int j;
		j=0;
		while(1){
			index = words.find("Hoshino",j);
			if(index == string::npos){
				//cout << j << endl;
				break;
			}
			words.replace(index,7,"Hoshina");
			j += 6;
			//cout << words << endl;
		}
		cout << words << endl;
	}
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

C++: #include<cstdio>
#include<iostream>
#include<string>
 
using namespace std;
 
int main(void){
    std::ios_base::sync_with_stdio(false);
 
    int n,cnt;
    string inp,bun;
 
    cin>>n;
    getchar();
    for(int i=0;i<n;i++){
        bun=("");
        cnt=0;
        while(1){
            inp=getchar();
            if(inp[0]=='\n') break;
            bun+=inp;
            if(cnt>=6){
                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';
            }
            cnt++;
        }
        cout<<bun<<endl;
    }
 
    return 0;
}

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

int main(){
	string x;
	int pos;
	int n;
	cin >> n;
		x = "";
		cin.ignore();
		while (n--){
			cin >> x;
		while ((pos=x.find("Hoshino"))!= string::npos){
			x.replace(pos, 7, "Hoshina");
		}
		cout << x << endl;

	}
}

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

int main()
{
	int n;
	char str[1001];

	scanf("%d\n", &n);
	for (int i = 0; i < n; i++) {
		fgets(str, 1001, stdin);
		str[strlen(str) - 1] = '\0';

		while (1) {
			if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
			else break;
		}
		puts(str);
	}

	return 0;
}

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

int main() {
  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;
      }
    }
    cout << endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
int main()
{
	int n;
	cin >> n;
	while(getchar()!='\n');
	for(int i=0;i<n;i++)
	{
		char str[1001];
		char *p;
		fgets(str,sizeof(str),stdin);
		while(strstr(str,"Hoshino")!=NULL)
		{
			p=strstr(str,"Hoshino");
			*(p+6) = 'a';
		}
		cout << str;
	}
	return 0;
}

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

int main(void)
{
  int n,s;
  string str;

  cin >> n;

  getline(cin, str);

  for(int i = 0 ; i < n ; i++)
    {
      getline(cin, str);
      s = str.size();
      
      for(int i = 0 ; i < s ; i++)
	{
	  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+6]='a';
	    }
        }
      cout << str << endl;
    }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<stdio.h>
using namespace std;
int main(){
	string f;
	char a[2000];
	int n;
	cin>>n;
	cin.ignore();
	for(int i=0;i<n;i++){
		getline(cin,f);
		for(int j=0;j<f.size();j++)
			a[j]=f[j];
		for(int j=0;j<f.size()-6;j++){
			if(a[j]=='H'&&a[j+1]=='o'&&a[j+2]=='s'&&a[j+3]=='h'&&a[j+4]=='i'&&a[j+5]=='n'&&a[j+6]=='o')
				a[j+6]='a';
		}
		for(int j=0;j<f.size();j++)
			cout<<a[j];
		cout<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstring>
using namespace std;
int main(){
int n,len;
string a;
cin>>n;
getline(cin,a);
for(int i=0;i<n;i++){
getline(cin,a);
len=a.size();
for(int o=0;o<=len;o++)
if(a[o]=='H'){
if(a[o+1]=='o')
if(a[o+2]=='s')
if(a[o+3]=='h')
if(a[o+4]=='i')
if(a[o+5]=='n')
if(a[o+6]=='o')
a[o+6]='a';}
cout<<a<<endl;}
return 0;
}