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>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
typedef pair<int, int> pii;
#define MAX 99999999
int main(){
    int n;cin>>n;
    char c; scanf("%c",&c);
    rep(p,n){
        string s;
    getline(cin,s);
            rep(i,s.length()){
        int b=(int)s.find("Hoshino",i);
        if(b!=-1)s.replace(b+i,7,"Hoshina");
    }
        cout<<s<<endl;
    }
return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main(){
	int n;
	scanf("%d\n",&n);
	while(n--){
		string s;
		getline(cin,s);
		while(s.find("Hoshino")!=-1) s.replace(s.find("Hoshino"),7,"Hoshina");
		cout<<s<<"\n";
	}
	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);
		while(x = a.find("Hoshino"), x != string::npos)
			a.replace(x, 7, "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

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

int main(){

  int n;
  char *str;

  scanf("%d",&n);

  for(int i=0;i<n;i++){
   
    while(scanf("%s",str)!=EOF){
      if(strcmp(str,"Hoshino")==0){
	printf("Hoshina");
      }
      else {
	printf("%s",str);

      }

    }
    printf("\n");

  }

  return 0;
}

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

int main(){
  int n;
  int i = 0;
  std::string str;
  std::string fr = "Hoshino";
  std::string to = "Hoshina";
  std::string::size_type ch;

  std::cin >> n;

  while(n > 0){
    
    //文字列の読み込み
    while(std::cin >> str){
    //"Hishino"を"Hoshina"に変換
        ch = str.find(fr);
        while(str.find(fr) != std::string::npos){
            str.replace(str.find("Hoshino"),fr.size(), to);
            ch = str.find(fr,ch+to.size());
            
    }
        std::cout << str << " " << std::flush;
        }
      --n;
      
}
}

C++: #include<stdio.h>

int main()
{
	int n,i,j=0,k;
	char str[1008],temp;
	
	scanf("%d",&n);
	temp=getchar();
	for(i=0;i<n;i++){
		for(j=0;;j++){
			str[j] = getchar();
			if(str[j] == '\n'){
				str[j] = '\0';
				break;
			}
		}
		
		for(k=0;k<j;k++){
			if((str[k]=='H' && str[k+1]=='o' && str[k+2]=='s' && str[k+3]=='h' && str[k+4]=='i' && str[k+5]=='n' && str[k+6]=='o') && (str[k+7]=='\0' || str[k+7]==' ' || str[k+7]=='.' || str[k+7]=='!' || str[k+7]=='?' || str[k+7]==','))str[k+6]='a';
		}
		printf("%s\n",str);
	}
	
	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string.h>
#include<math.h>
#include<cstring>
using namespace std;
char text[1001];
int main(){
	int i,ii,j,n,a;
	cin>>n;
	
			for(i=0;i<n;i++){
			while(gets(text)){a=strlen(text);
			for(j=0;j<a-6;j++){
				if(text[j]=='H'&&text[j+1]=='o'&&text[j+2]=='s'&&text[j+3]=='h'&&text[j+4]=='i'&&text[j+5]=='n'&&text[j+6]=='o'){
					text[j+6]='a';j+=6;
				}
			}
			if(i!=0)cout<<endl;
			cout<<text;
		}
	}
    return 0;
}

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

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

int main()
{
	int n;

	cin >> n;
	cin.get();

	for( int i = 0; i < n; ++i ){
		string s;
		getline( cin, s );
		int index = 0;
		while( ( index = s.find( "Hoshino", index ) ) != string::npos ){
			s.replace( index, 7, "Hoshina" );
			index += 7;
		}
		cout << s << endl;
	}

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pii;

int main(){
	int n;
	//cin>>n;
	string t;
	getline(cin,t);
	n=atoi(t.c_str());
	rep(i,0,n){
		string s;
		getline(cin,s);
		//o(" "<<s);
		while(1){
			if(s.find("Hoshino")!=string::npos){
				s.replace(s.find("Hoshino"),7,"Hoshina");
			}
			else break;
		}
		o(s);
	}
}

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

using namespace std;

int main() {
	int n, pos;
	string str;

	cin>>n; cin.get( );
	while(n--){
		getline(cin, str); 
		while(pos = str.find("Hoshino"),pos!=string::npos){
			str.replace(pos, 7, "Hoshina");
		}
		cout<<str<<"\n";
	} 
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <stdio.h>
#include <string>
#include <string.h>
#include <queue>
#include <cmath>
#include <stack>
#include <map>
#include <vector>
#include <algorithm>

#define int64 long long int
using namespace std;

int main()
{
	int n, c, buf, len;
	char str[1024]={0};
	cin >> n;

	if((c = getchar()) == '\n')
	for(int i=0; i<n; i++){
		buf = 0;
		while(1){
			c = getchar();
			if(c == '\n' || c == EOF){
				str[buf] = '\0';
				break;
			}
			str[buf] = c;
			buf++;
		}
		len = strlen(str);
		for(int j=0; j<=len-7; j++){
			if(str[j] != 'H') continue;
			if(str[j+1] != 'o') continue;
			if(str[j+2] != 's') continue;
			if(str[j+3] != 'h') continue;
			if(str[j+4] != 'i') continue;
			if(str[j+5] != 'n') continue;
			if(str[j+6] != 'o') continue;
			str[j+6] = 'a';
		}
		printf("%s\n", str);
		memset(str, 0, 1024);
	}

	return 0;
}

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

int main(){
	int data_set;
	std::cin >> data_set;
	std::cin.get();
	std::string document[data_set];
	for(int i = 0; i < data_set; ++i){
		std::getline(std::cin, document[i]);
	}
	for(int i = 0; i < data_set; ++i){
		auto pos = document[i].find("Hoshino");
		while(pos != std::string::npos){
			document[i].replace(pos, 7, "Hoshina");
			pos = document[i].find("Hoshino", pos + 7);
		}
		std::cout << document[i] << std::endl;
	}
	return 0;
}