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 <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <typeinfo>
#include <map>
#define INF 100000000
#define rep(i,a) for(int i=0;i<(a);i++)

using namespace std;
typedef long long ll;



int main(){
    int n;
    cin>>n;
    getchar();

    rep(i,n){
        string s;
        getline(cin,s);
        for(int i=0;i<s.size();i++){
            if(s[i]=='H' && s[i+1]=='o' && s[i+2]=='s' && s[i+3]=='h' && s[i+4]=='i' && s[i+5]=='n' && s[i+6]=='o'){
                s[i+6]='a';
            }
        }
        cout<<s<<endl;
    }
     return 0;
 }

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

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

int n;
char buf[1000000];

int main() {
  scanf("%d ", &n);
  while (n--) {
    fgets(buf, sizeof(buf), stdin);
    
    string ans(buf);
    int pos = ans.find("Hoshino");
    if (pos != string::npos) {
      ans = ans.replace(pos, strlen("Hoshino"), "Hoshina");
    }
    printf("%s", ans.c_str());
  }
}

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

using namespace std;

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

	string rect = "Hoshino";

	for (int t = 0; t < n; ++t) {
		while (1) {
			string str; cin >> str;

			for (int i = 0; i < str.size(); ++i) {
				for (int j = 0; j < rect.size() && i < str.size(); ++i, ++j) {
					if (str[i] != rect[j]) break;
					else if (j == rect.size()-1) str[i] = 'a';
				}
			}

			cout << str;

			char c = getchar();
			if (c == '\r' || c == '\n') break;

			cout << " ";
		}
		cout << endl;
	}
}

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

int main()
{
	int g,i;
	string ob;
	
	cin >> i;
	
	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 <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);
 
    //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>
#include<cstdio>
using namespace std;

int main() {
	int n;
	string s;
	scanf("%d\n", &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;
	}
}

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

using namespace std;

int main(){
	int n;
	std::cin >> n;cin.get( );
	for(int i=0;i<n;i++){
		string s;
		getline(cin, s);
		for(int j=6;j<s.size();j++){
			if(s.substr(j-6,7)=="Hoshino"){
				s.at(j)='a';
			}
		}
		cout << s << endl;
	}
	return 0;
}

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

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(int x=from;x<to;x++)

using namespace std;

void RepStr(string& str, const string& from, const string& to){
   string::size_type pos = 0;
 
  while(pos = str.find(from, pos), pos != string::npos) {
     str.replace(pos, from.length( ), to);
     pos += to.length();
   }
}


int main(void){

string ws;
int n;
	cin >> n;
	cin.ignore();
	rep(i,n){
		getline(cin,ws);
		RepStr(ws,"Hoshino","Hoshina");
		cout << ws << 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;
	rep(i,0,n){
		string s;
		getline(cin,s);
		while(1){
			if(s.find("Hoshino")!=string::npos){
				s.replace(s.find("Hoshino"),7,"Hoshina");
			}
			else break;
		}
		o(s);
	}
}

C++: #include <iostream>
#include <iterator>
#include <string>
using namespace std;
int main()
{
	bool flg;
	int n, i, c;
	string w, s;
	unsigned int x;
	cin >> n;
	for (i = 0; i < n; i++)
	{
		c = 0;
		s = "";
		while (1)
		{
			w = "", flg = false;
			cin >> w;
			if (w == "Hoshino.")
				s += "Hoshina.", flg = true;
			if (w == "Hoshino")
				s += "Hoshina", flg = true;
			if (!flg)
				s += w;
			if (cin.get() == '\n') break;
			s += " ";
		}
		s.erase(s.end(), s.end());
		cout << s << endl;
	}
	return 0;
}

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

int main(){
    std::string buf;
    int n;
    
    std::cin >> n;
    // now, there is "\n ...." in the stream.
    // then, skip the initial '\n'.
    std::getline(std::cin,buf);

    for (int i=0;i < n;++i) {
        std::getline(std::cin,buf);
        std::stringstream ss(buf);
        while (ss >> buf) {
            if (buf == "Hoshino") {
                std::cout << "Hoshina ";
            }
            else if (buf == "Hoshino,") {
                std::cout << "Hoshina, ";
            }
            else if (buf == "Hoshino.") {
                std::cout << "Hoshina. ";
            }
            else{
                std::cout << buf << " ";
            }
        }
        std::cout << std::endl;
    }
    
    return 0;
}

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

using namespace std;

void solve()
{
	int n;
	char c;
	scanf("%d%c", &n, &c);
	while(n--)
	{
		string str;
		getline(cin, str);
		for(int i = 0; i < str.size(); ++i)
		{
			if(str[i] == 'H' && i + 6 < str.size() && 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';
				i += 6;
			}
		}
		cout << str << endl;
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){
	
	int n;
	string s;
	string d="Hoshina";
	cin>>n;
	cin.ignore();
	while(n--){
		getline(cin,s);
		for(int i=6;i<s.size();i++){
		if(s.substr(i-6,7)=="Hoshino")
		s.at(i)='a';
		}
		cout<<s<<endl;
	}
}

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

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

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