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 <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 29;
static const LL LL_INF = 1ll << 60;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };

#ifdef WIN32
#define dump(x) cout << #x << " = " << (x) << "\n"
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n"
#else
#define dump(x)
#define debug(x)
#endif

string str;

void solve() {
	for ( int i = 7; i <= str.size(); i++ ) {
		if ( str.substr( i - 7, 7 ) == "Hoshino" ) {
			str = str.substr( 0, i - 7 ) + "Hoshina" + str.substr( i, str.size() - i );
		}
	}
	printf( "%s\n", str.c_str() );
}

int main() {
#ifdef WIN32
	printf( "Debug Mode\n" );
#endif
	int n;
	scanf( "%d\n", &n );
	while ( n-- ) {
		getline( cin, str );
		solve();
	}
	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::cout << std::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, strlen("Hoshino"), "Hoshina" );
			index += strlen("Hoshina");
		}
		cout << s << endl;
	}

	return 0;
}

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<<endl;
 } 
 return 0;
}

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

int main(){
	std::string f="Hoshino";
	std::string fa="Hoshina";
	std::string a;
	int n;
	std::cin>>n; std::cin.ignore(); 
	for(int j=0;j<n;j++){
		getline(std::cin,a);
		std::string::size_type index=a.find(f);
		if(index==std::string::npos)std::cout<<a<<std::endl;
		else{
			for(int i=0;i<f.size();i++){
				a[i+index]=fa[i];
			}
			std::cout<<a<<std::endl;
		}
	}
	return 0;
}

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

int main(){
    int dataSetNum;
    std::cin >> 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;
        getline(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::string tmp;
    	tmp = str[i].front();
    	std::for_each(str[i].begin() + 1, str[i].end(),
    [&tmp](std::string x) { tmp += ' ' + x; } );
    	std::cout << tmp << std::endl;
    }

    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
int main()
{
	int n;
	cin >> n;
	while(getchar()!='\n');
	for(int i=0;i<n;i++)
	{
		char str[1001];
		fill(str,str+1001,'\0');
		char *p;
		fgets(str,sizeof(str),stdin);
		for(int j=0;j<1001;j++)
		{
			if(str[j]=='\n')
			{
				str[j]='\0';
			}
		}
		while(strstr(str,"Hoshino")!=NULL)
		{
			p=strstr(str,"Hoshino");
			*(p+6) = 'a';
		}
		cout << str << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(void)
{
    string check = "Hoshino";
    int n; cin >> n;

    for (int i = 0; i < n; i++) {
        string str; 
        if(i == 0) cin.ignore();
        getline(cin, str);
        if( str.length() < 7) {
            cout << str << endl;
            continue;
        }
        for (int j = 0; j < str.length()-6; j++) {
            for (int k = 0; k < 7; k++) {
                //printf("%c %c\n", check[k], str[j+k]);
                if (check[k] == str[j+k] && k < 6) continue;
                else if (check[k] == str[j+k] && k == 6) {
                    str[j+k] = 'a';
                } else break;
            }
        }
        cout << str << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

int main() {
	int n;
	string str;
	getline(cin, str);
	n = atoi(str.c_str());
	for (int i = 0; i < n; i++) {
		getline(cin, str);
		while (1) {
			size_t pos = str.find("Hoshino");
			if (pos == string::npos)
				break;
			str.replace(pos, 7, "Hoshina");
		}
		cout << str << endl;
	}
	return 0;
}

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 << endl;
	}
}