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(){
	std::string str;
	u_int data_num;
	std::cin >> data_num;
	std::cin.ignore();
	for(u_int i = 0; i < data_num; ++i){
		int loc = 0;
		std::getline(std::cin, str);
		while((loc = str.find("Hoshino", loc)) != -1){
			str[loc+6] = 'a';	
		}
		std::cout << str << std::endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
  string cc,c;
  string base[2]={"Hoshino","Hoshina"};
  int n,x;
  cin >> n;
  getline(cin,c);
  for(int i=0;i<n;i++){
    getline(cin,cc);
    x = 0;
    while(1){
      if(x==0) x = cc.find(base[0],x);
      else if(x>0) x = cc.find(base[0],x+7);
      if(x==-1) break;
      cc.replace(x,7,base[1]);
    }
    cout << cc << endl;
  }
    return 0;
}

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

int main(){
	int dataSetNum;
	std::cin >> dataSetNum;
	std::vector<string> *str = new std::vector<string>[dataSetNum];
	//input & sprit
	for(int i = 0; i < dataSetNum; ++i){
		//input
		std::string tmp;
		std::string buf;

		std::cin >> tmp;

		std::stringstream ss(tmp);
		//sprit
		while( getline(ss, buf, ' ') ){
			str[i].push_back(buf);
		}

	}

	//replace
	for(int i = 0; i < dataSetNum; ++i){
		std::replace_if(str[i].begin(), str[i].end(),
    [](string x) { return x == 'Hoshino'; }, 'Hoshina');
	}

	//output
	for(int i = 0; i < dataSetNum; ++i){
		std::for_each(str[i].begin(), str[i].end(),
    [](string x) { std::cout << x << std::endl; });
}
	}
	return 0;
}

C++: #include<iostream>
#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 <sstream>
#include <iostream>
#include <array>

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, ' ')){
            if(word == "Hoshino"){
                word = "Hoshina";
            }
            if(new_sentence != ""){
                new_sentence += (' ' + word);                
            } else {
                new_sentence += word;                
            }
        }
        std :: cout << new_sentence << std :: endl;
    }
}

C++: #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <sstream>
#include <fstream>
#include <string.h>

#define X first
#define Y second
#define MP make_pair
typedef long long ll;
using namespace std;
const int MAX = 101;

template<class T, class U>
void convert(T &t, U &u){
	stringstream ss;
	ss << t;
	ss >> u;
}

int main(){
	int n;
	cin >> n;
	cin.ignore();
	while(n--){
		string s;
		getline(cin, s);
		while(1){
			int res = s.find("Hoshino", 0);
			if(res == -1) break;
			s.replace(res, 7, "Hoshina");
		}
		cout << s << endl;
	}
	return 0;
}

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

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

	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int n;
  cin>>n;
  cin.ignore();
  rep(j,n){
    string s;
    getline(cin,s);
    int n;
    while(n=s.find("Hoshino"),n!=string::npos)s[n+6]='a';
    //rep(i,s.size()-6)if(s.substr(i,7)=="Hoshino")s.replace(i,7,"Hoshina");
    cout<<s<<endl;
  }


}

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


int n;
std::string str;
std::string strs[1000];


void solve();
void split();


void solve() {
	split();

	for (auto& var : strs) {
		if (var == "Hoshino") {
			var = "Hoshina";
		}

		std::cout << var;
	}

	std::cout << std::endl;

}

void split() {
	int i = 0, cnt = 0;
	std::string hoge;

	while (i < str.size()) {
		if (str[i] == ' ' || str[i] == ',' || str[i] == '.') {
			strs[cnt++] = hoge;
			hoge = "";
		}
		else {
			hoge += str[i];
		}

		i++;
	}

	strs[cnt] = hoge;
}


int main() {
	std::cin >> n;

	for (;  n >= 0; n--) {
		std::getline(std::cin, str);

		solve();
	}

	return 0;
}

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

int main(){
	int num;
	std::string english;
	std::cin >> num;
	while(num>50) std::cin >> num;
	for(int i=0;i<=num;++i){
		std::getline(std::cin,english);
		while(english.find("Hoshino") != -1){
			int find = english.find("Hoshino");
			english.replace(find, find+7, "Hoshina");
		}

		std::cout << english << std::endl;
	}
    return 0;
}

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

int main(void){
	std::string str;

	while(std::cin >> str){
		std::string::size_type index;

		for(index = str.find("Hoshino"); index != std::string::npos; index = str.find("Hoshino",index + 6)){
			str.replace(index,7,"Hoshina");
		}

		std::cout << str << std::endl;
	}
	return 0;
}

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

using namespace std;

string s;

signed main()
{
    int n = 0;
    scanf( "%d\n", &n );
    while( 0 < n )
    {
        getline( cin, s );
        s = replace( s, "Hoshino", "Hoshina" );
        cout << s << endl;
        n--;
    }
    return 0;
}

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

using namespace std;

int main(){
  int num;
  char c;
  cin >> num;
  scanf("%c",&c);
  for(int i = 0; i < num; i++){
    string str;
    while(1){
      scanf("%c",&c);
      if(c == '\n'){
	if(str != "Hoshino")cout << str << endl;
	else cout << "Hoshina" <<  endl;
	break;
      }
      if(c == ' '){
	if(str != "Hoshino")cout << str << " ";
	else cout << "Hoshina ";
	str = "";
	continue;
      }
      if(!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')){
	if(str != "Hoshino")cout << str << c;
	else cout << "Hoshina" << c;
	str = "";
	continue;
      }
      str += c;
    }

  }
  return 0;
}

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

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

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

int main(){

    int data_set_num;
    std::string str;
    std::string from = "Hoshino";
    std::string to = "Hoshina";
    std::cin >> data_set_num;
    std::cin.ignore();

    while(data_set_num--){
        std::getline(std::cin,str);
        std::string::u_int pos = str.find(from);
        while(pos != std::string::npos){
            str.replace(pos, from.size(), to);
            pos = str.find(from, pos + to.size());
        }
        std::cout << str << std::endl;
    }

    return 0;
}