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 <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cmath>
#include <cstdio>
#include <istream>
#include <sstream>
#include <iomanip>
#include <iterator>
#include <climits>
using namespace std;

typedef ostringstream OSS;
typedef istringstream ISS;

typedef vector<int> VI;
typedef vector< VI > VVI;

typedef long long LL;

typedef pair<int, int> PII;
typedef vector<PII> VPII;

#define X first
#define Y second

string replace_all(string s, string before, string after) {
	for (int i = 0; i + before.size() <= s.size(); i++) {
		if (s.substr(i, before.size()) == before) {
			s.replace(i, before.size(), after);
		}
	}

	return s;
}

int main(void) {
	int N;
	cin >> N;
	cin.get();
	for (int i = 0; i < N; i++) {
		string s;
		getline(cin, s);
		cout << replace_all(s, "Hoshino", "Hoshina") << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <string>
    
int main(){
    const std::string wrong_word("Hoshino");
    const std::string right_word("Hoshina");
      
    int num;
    std::cin >> num;
    std::cin.ignore(); // ignore next newline character
        
    for(int i = 0; i < num; ++i){
        std::string str;
        std::getline(std::cin, str);
          
        std::size_t pos = str.find(wrong_word);
        while(pos != std::string::npos){
            str.replace(pos, wrong_word.length(), right_word);
            pos = str.find(wrong_word);
        }
          
        std::cout << str << std::endl;
    }
    return 0;
}

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

int main(){
	long long int n;
	char* a;
	char letter[1000];
	cin >> n;
	while(1){
		for(int i=0 ; i<n ; i++){
			cin >> letter;
		}
		do {
			a=strstr(letter , "Hoshino");
			if (a==NULL) break;
			strncpy(a , "Hoshina" , 7);
			
		} while (a!='\0');
		cout << letter << endl;
		n--;
		if (!n) break;
	}
	return 0;
}

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

int main(void){
    std::string str;
    int N;
    std::cin >> N;
    std::cin.ignore();
    for(int i = 0; i < N; ++i){
        getline(std::cin, str);
        int pos;
        while((pos = str.find("Hoshino")) != -1){
            str.replace(pos, 7, "Hoshina");
        }
        std::cout << str << std::endl;
    }
}

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

int main(void) {
    u_int n;
    std::string str;
    std::regex regexp("Hoshino");

    std::cin >> n; std::cin.ignore();
    for (u_int i = 0; i < n; ++i) {
        std::getline(std::cin, str);
        std::cout << std::regex_replace(str, regexp, "Hoshina") << std::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 hoshino = "Hoshino";
	string hoshina = "Hoshina";
	int tSup;
	cin >> tSup;
	cin.ignore();
	REP(t,tSup){
		string x;
		getline(cin,x);
		while(true){
			int i = x.find(hoshino,0);
			if(i==string::npos){break;}
			x.replace(i,hoshino.length(),hoshina);
		}
		cout << x << endl;
	}
	return 0;
}

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

int main(void){
	int num;
	std::string str;
	std::string::size_type index;

	std::cin >> num;
	std::cin.ignore();

	for(int i; i < num; ++i){
		getline(std::cin, str);

		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 <iostream>
#include <vector>
#include <sstream>
#include <algorithm>
#include <string>
 
int main(){
    int dataSetNum;
    std::cin >> dataSetNum;

    //std::vector<string> *str = new std::vector<string>[dataSetNum];
    std::vector< std::vector< std::string > > str;
    str.resize(dataSetNum);
    std::cin.ignore();
    //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(),
    [](std::string x) { return x == "Hoshino"; }, "Hoshina");
    }
 
    //output
    for(int i = 0; i < dataSetNum; ++i){
        std::for_each(str[i].begin(), str[i].end(),
    [](std::string x) { std::cout << x << std::endl; });
    }
 
    return 0;
}

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

typedef unsigned int uint;

int main() {
	int n, idx; string s;
	cin >> n; cin.ignore();
	while(n--) {
		getline(cin, s);
		idx = -7;
		while((idx=s.find("Hoshino", idx+7))!=string::npos) s.replace(idx, 7, "Hoshina");
		cout << s << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#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<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

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

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

using namespace std;

int main(void){
  int line_length;
  cin>>line_length;cin.ignore(3);


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

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

using namespace std;

int main()
{
	int n;
	string str;
	char tmp[1010];
	cin >> n;
	cin.ignore();
	while (n > 0){
		cin.getline(tmp, sizeof(tmp));
		str = tmp;
		int len = 0;
		while (1){
			len = str.find("Hoshino", len);
			if (len == -1)  break;
			str[len + 6] = 'a';
		}
		cout << str << endl;
		n--;
	}
	return (0);
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    string str;vector<string> vs;
    vs.clear();
    while(cin>>str){
      if(str=="Hoshino"){
	vs.push_back("Hoshina");
      }else
	vs.push_back(str);
    }
    for(int j=0;j<vs.size();j++){
      cout<<vs[i];
      if(j!=vs.size()-1)
	cout<<" ";
    }
    cout<<endl;
  }
  return 0;
}

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

int main() {
	string st;
	int n;
	string::size_type id;
	cin >> n;
	getchar();
	for (n;n>0;n--) {
		getline(cin,st);
		id=0;
		while(true) {
			id=st.find("Hoshino",id);
			if (id==string::npos) break;
			st.replace(id,7,"hoshina");
			id++;
		}
    cout << st << endl;  
	}
	return 0;
	}