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 <string>
#include <iostream>

using namespace std;

int main()
{
    string S; int N;
    
    cin >> N;
    
    for(int i = 0; i < N; i++)
    {
        getline(cin, S);
        
        while(S.find("Hoshino") != string::npos)
        {
            S.replace(S.find("Hoshino"), 7, "Hoshina");
        }
        
        cout << S << endl;
    }
    
    return 0;
}

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

using namespace std;

int main()
{
    string S; int N;
    
    cin>> N;
    
    for(int i = 0; i <= N; i++)
    {
        getline(cin, S);
        
        while(S.find("Hoshino") != string::npos)
        {
            S.replace(S.find("Hoshino"), 7, "Hoshina");
        }
        
        cout << S << endl;
    }
    
    return 0;
}

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

int main(){
    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';
            }
        }
        //if(str=="")cout << "HOOGE" << endl;
        cout << str << endl;
    }
    return 0;
}

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

using namespace std;

int main() {
	int n;
	cin >> n;
	cin.ignore();
	for (int i = 0; i < n; i++) {
		string s;
		getline(cin, s);
		string from = "Hoshino";
		string to = "Hoshina";
		auto pos = s.find(from);
		while(pos != string::npos) {
			s.replace(pos, from.size(), to);
			pos = s.find(from, pos + to.size());
		}
		cout << s << endl;
	}
}

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

int main(){
	int n;
	string in[50];
	getline(cin, in[0]);
	n = stoi(in[0]);
	for (int i = 0; i < n;i++) {
		getline(cin, in[i]);
		while (true) {
			int hoshi = in[i].find("Hoshino");
			if (hoshi >= 0) {
				in[i].replace(hoshi, 7, "Hoshina");
			}
			else break;
		}
	}
	for(int i = 0; i < n;i++){
		cout << in[i] << endl;
	}
	return 0;
}

C++: #include <string>
#include <iostream>
#include <cstdio>
int main(){
	int n;
	scanf("%d", &n);
	std::string s;
	for(int i=0;i<n;++i){
		std::getline(std::cin,s);
		while(s.find("Hoshino") != std::string::npos){
			s[s.find("Hoshino")+6]='a';
			//std::cout<<s.find("Hoshino")<<std::endl;
		}
		//std::cout<<"tes"<<std::endl;
		std::cout<<s<<std::endl;
	}
	return 0;
}

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

int main(void)
{
	int n, i;
	char a[1000][1000] = {0};
	char *p;

	scanf("%d\n", &n);
	
	for (i = 0; i < n; i++)
		gets(a[i]);

	for (i = 0; i < n; i++)
	{
		p = strstr(a[i], "Hoshino");
			p[6] = 'a';
	}

	for (i = 0; i < n; i++)
		puts(a[i]);

	return 0;
}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(li i=0;i<((li)(to));i++)
#define repp(i,start,to)	for(li i=(li)(start);i<((li)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


int main(){
	li n;
	cin>>n;
		string ss;
		getline(cin,ss);
	rin{
		string s;
		getline(cin,s);
		rep(j,sz(s)-6){
			if(s.substr(j,7)=="Hoshino"){
				s[j+6]='a';
				j+=5;
			}
		}
		cout<<s<<endl;
	}

	return 0;
}

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

int main (){
  int n;
  int pos;
  string s;

  cin >> n;
  cin.ignore();
  for (int i = 0; i < n ; ++i){
    getline(cin, s);
    while(1){
      pos = s.find("Hoshino");
      if(pos == -1) break;
      s[pos+6] = 'a';
    }
    cout << s << endl;
  }
  return 0;
}

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

int main() {
  int n;

  cin >> n;
  cin.ignore();
  
  for (int i=0; i<n; i++) {
    string str;
    const string from = "Hoshino";
    const string to = "Hoshina";
    
    getline(cin, str);
    
    string::size_type pos = str.find(from);
    while (pos != string::npos) {
      str.replace(pos, from.size(), to);
      pos = str.find(from, pos + to.size());
    }

    cout << str << endl;
  }
}

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

int main(){
    int line_num = 0;
    std :: string ori_sentence, new_sentence, word;
    std :: cin >> line_num;
    std :: getline(std :: cin, ori_sentence);
    for(int i = 0;i < line_num;i++){
        std :: getline(std :: cin, ori_sentence);
        std :: stringstream ss(ori_sentence);
        new_sentence = "";
        while(std :: getline(ss, word, '\t')){
            if(word == "Hoshino"){
                word = "Hoshina";
            }
            if(new_sentence != ""){
                new_sentence += ('\t' + word);                
            } else {
                new_sentence += word;                
            }
        }
        std :: cout << new_sentence << std :: endl;
    }
}

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

int main()
{
	int n;
	std::string s;
	std::vector<std::string> vec;
	
	std::cin >> n;
	
	for( int i = 0; i < n + 1; i++ ){
		std::getline( std::cin, s );
		vec.push_back( s );
	}
	
	for( std::vector<std::string>::iterator it = vec.begin(); it != vec.end(); it++ ){
		while( it->find( "Hoshino" ) != std::string::npos ){
			it->replace( it->find( "Hoshino" ), 7, "Hoshina" );
		}
		std::cout << *it << std::endl;
	}

 	return 0;
}

C++: #include<iostream>

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

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

C++: #include <iostream>
#include <sstream>
#include <vector>
 
int main(void){
    int n; //number of data set
 
    std::cin >> n; //input number of data set
    std::cin.ignore(); //delete cin buffer
 
    for(size_t i = 0; i < n; ++i){
        std::vector<std::string> str; //string data
        std::string line; //outputted line data 
         
        std::string buf;
        std::string tmp;
 
        std::getline(std::cin, buf); //input line data
        std::istringstream is(buf);
 
        while(is >> tmp){ //input word
            while(tmp.find("Hoshino") != -1){ //judge word
                tmp.replace(tmp.find("Hoshino"), 7, "Hoshina");
            }
            str.push_back(tmp); //add word to list
        }
 
        //make outputted line data
        for(std::vector<std::string>::iterator it = str.begin(); it != str.end(); ++it){
            if(it == (str.end() - 1)){
                line = line + *it;
            }else{
                line = line + *it + " ";
            }
        }
 
        //output line data
        std::cout << line << std::endl;
    }
 
    return 0;
}