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 <sstream>
#include <vector>

int main(void){
	std::string tmp;
	u_int n; //number of data set

	std::cin >> n; //input number of data set
	std::cin.ignore();

	for(size_t i = 0; i < n; ++i){
		std::vector<std::string> str; //string data
		std::string buf;

		std::getline(std::cin, buf); //input line
		std::istringstream is(buf);

		while(is >> tmp){ //input word
			if(tmp == "Hoshino"){ //judge word
				tmp = "Hoshina";
			}
			str.push_back(tmp); //add word to list
		}

		//output line
		for(std::vector<std::string>::iterator it = str.begin(); it != str.end(); ++it){
        	std::cout << *it << " ";
        }
        std::cout << std::endl;
	}

	return 0;
}

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

int main()
{
    const std::string str_false = "Hoshino";
    const std::string str_true = "Hoshina";

    u_int num_of_data;
    std::string text;
    getline(std::cin, num_of_data);
    
    for(u_int i = 0; i < num_of_data; ++i){
        getline(std::cin, text);
        u_int index = 0;
        
        while((index = text.find(str_false, index)) != std::string::npos){
            text.replace(index, str_false.size(), str_true);
            index += str_false.size() + 1;
        }
        std::cout  << text << std::endl;
    }
    
    return 0;
}

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

using namespace std;

int main(void)
{
	int n;
	string a;

	cin >> n;
	cin.ignore();

	for (int i = 0; i < n; ++i){
		int x = 0;
		getline(cin, a);
		if ((x = a.find("Hoshino")) >= 0)
			a.replace(x, strlen("Hoshino"), "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

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

int main()
{
    const std::string str_false = "Hoshino";
    const std::string str_true = "Hoshina";

    u_int num_of_data;
    std::cin >> num_of_data;
    std::cin.ignore();
    
    for(u_int i = 0; i < num_of_data; ++i){
        std::string text;
        getline(std::cin, text);
        
        u_int index = 0;
        while((index = text.find(str_false, index)) != std::string::npos){
            text.replace(index, str_false.size(), str_true);
            index += str_false.size() + 1;
        }
        std::cout  << text << std::endl;
    }
    
    return 0;
}

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

int main(){
  int n;
  string str="";
  queue<string> questr;
  stringstream ss;

  cin>>n;
  for(int i=0;i<n;i++){
	 for(;;){
		getline(cin,str);
		if(str!="") break;
	 }
	 ss<<str;str="";
	 for(;;){
		ss>>str;
		if(str=="") break;
		if(str=="Hoshino") str="Hoshina";
		questr.push(str);
		str="";
	 }

	 cout<<questr.front();questr.pop();
	 while(!questr.empty()){
		cout<<" "<<questr.front();
		questr.pop();
	 }
	 cout<<endl;

	 ss.str("");
	 ss.clear(stringstream::goodbit);
	 while(!questr.empty()) questr.pop();
  }
  return 0;
}

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

int main(void)
{
	int N;
	

	scanf("%d", &N);
	fflush(stdin);
	while(--N, N>=0){
		char instr[1001];
		char *t;

		gets(instr);
		while( (t = strstr(instr, "Hoshino")) != NULL){
			t += 6;
			*t = 'a';
		}

		printf("%s\n", instr);
	}


	return 0;
}

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

int main()
{
	int n;
	char str[1000];

	scanf("%d", &n);
	for (int i = 0; i < n+1; i++) {
		fgets(str, 1000, stdin);

		if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
		puts(str);
	}

	return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <iomanip>

using namespace std;

int n;
string s;


string find_str = "Hoshino";	// 検索対象の文字列
string rep_str = "Hoshina";

int main(){
    
        
    while(cin>>n){
        cin.ignore();
        for(int i=0; i<n; i++){
            getline(cin, s);
            int f;
            while((f=s.find("Hoshino"))!=-1){
                s.replace(f, find_str.length(), rep_str);
            }
            cout<<s<<endl;

        }
        
    }
    
}

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

int main(){
	string str;
	int n;
	cin >> n;
	getline(cin, str);
	for (int i = 0; i < n; i++) {
		getline(cin, str);
		for (int j = 0; j < int(str.size()) - 6; j++) {
			if (str[j] == 'H') {
				if (str.substr(j + 1, 6) == "oshino")str.replace(j, 7, "Hoshina");
				else if (str.substr(j + 1, 6) == "oshina")str.replace(j, 7, "Hoshino");
			}
		}
		cout << str << endl;
	}
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <climits>
#include <cmath>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;

#define ITER( c ) __typeof( c ).begin()
#define REP( i, m, n ) for ( int i = m; i < n; i++ )
#define UREP( i, m, n ) for ( unsigned int i = m; i < n; i++ )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) c.begin(), c.end()
#define PB( n ) push_back( n );
#define MP( a, b ) make_pair( a, b )
#define fst first
#define snd second

int main()
{
	int n;
	cin >> n;
	cin.ignore( 1 );

	REP( i, 0, n )
	{
		string line;
		getline( cin, line );

		while ( true )
		{
			int pos = line.find( "Hoshino", 0 );
			if ( pos == string::npos )
			{
				break;
			}
			else
			{
				line.replace( pos, 7, "Hoshina" );
			}
		}

		cout << line << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
using namespace std;
#define MAX_SIZE 10000
typedef pair<int, int> pii;
#define MAX 99999999

int main(){
    
    int n;
    cin >> n;
    //	cout << n << endl;
    int j;
    bool checking  = true;
    for( j = 0; j<=n; j++)
    {
        checking = true;
        char s[MAX_SIZE] = {};
        gets(s);
        int i = 0;
        while(*(s+i) != '\0')
        {
            //printf("%c",*(s+i));
            bool check = true;
            if(*(s+i) == 'H')
                if(*(s+i+1) == 'o')
                    if(*(s+i+2) =='s' )
                        if(*(s+i+3) =='h' )
                            if(*(s+i+4) == 'i')
                                if(*(s+i+5) == 'n' )
                                    if(*(s+i+6) == 'o')
                                    {
                                        cout << "Hoshina";
                                        i+=7;
                                        check = false;
                                        checking = check;
                                    } 
            if(*(s+i) != 'H' || check  == true)
            {
                printf("%c",*(s+i));
                i++;
            }
            checking = true;
        }	
        if(j)cout << endl;
        if(checking == false)
        {
            cout << endl;
            checking = true;
        }
        cout << endl;
    }
    return 0;
    
}