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<math.h>
#include<vector>
#include<algorithm>
#include<cstdio>
using namespace std;
 
int main(void){
  int n;
  cin>>n;
  cin.ignore();
  string line;
  string s = "Hoshina";
  while(getline(cin, line)){
    while(line.find("Hoshino")!=string::npos){
      line.replace(line.find("Hoshino"), s.size(), s);
    }
    cout<<line<<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>

#define loop(v, f, l) for(int v = (f), v##_ = (l); v < v##_; ++v)

using namespace std;

typedef long long int lint;
static inline int in(){ int x; scanf("%d", &x); return (x); }
static inline lint inl(){ lint x; scanf("%lld", &x); return (x); }

vector<string> split(const string& input)
{
	istringstream stream(input);

	string field;
	vector<string> result;
	while( std::getline(stream, field, ' ') )
	{
		result.push_back(field);
	}
	return result;
}

int main()
{
	int n;

	scanf("%d\n", &n);
	loop(i, 0, n)
	{
		string line;
		std::getline(cin, line);
		
		vector<string> words = split(line);
		for(vector<string>::iterator it = words.begin(); it != words.end(); it++)
		{
			string showStr = *it;
			int findPos = showStr.find("Hoshino");

			if( findPos != string::npos && findPos == 0 && !isalpha(showStr.substr(7).data()[0]))
			{
				showStr.replace(findPos, 7, "Hoshina");
			}
			printf("%s ", showStr.c_str());
		}
		cout << endl;
	}
	return (0);
}

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

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

C++: #include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int i,j,k,n;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        char a[1050]={0};
        fflush(stdin);
        scanf("%[^\n]",a);
        fflush(stdin);
        for(j=0;j<strlen(a);j++)
        {
            if(a[j]=='H'&&a[j+1]=='o'&&a[j+2]=='s'&&a[j+3]=='h'&&a[j+4]=='i'&&a[j+5]=='n'&&a[j+6]=='o')
            {
                a[j+6]='a';
            }
        }
        printf("%s\n",a);
        //for(j = 0; j < 1050; j++)a[j]=0;
        fflush(stdin);
    }
    return 0;
}

C++: #include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int i,j,n;
    scanf("%d",&n);
    getchar();
    for(i=0;i<n;i++)
    {
        char a[1050]={0};
        //fflush(stdin);
        getchar();
        scanf("%[^\n]",a);
        for(j=0;j<strlen(a);j++)
        {
            if(a[j]=='H'&&a[j+1]=='o'&&a[j+2]=='s'&&a[j+3]=='h'&&a[j+4]=='i'&&a[j+5]=='n'&&a[j+6]=='o')
            {
                a[j+6]='a';
            }
        }
        printf("%s\n",a);
        //for(j = 0; j < 1050; j++)a[j]=0;
    }
    return 0;
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

int main() {
	int n;
	cin >> n;
	string sub;
	for (int i = 0; i < n; ++i) {
		string s;
		getline(cin, s);
		for (int j = 0; j < s.size(); ++j) {
			if (s.size() < 7) {
				break;
			}
			sub = s.substr(j, 7);
			if (sub == "Hoshino") {
				s.replace(j, 7, "Hoshina");
			}
		}
		cout << s << endl;
	}
	return 0;
}

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

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

  	getline(cin, A);
  	while(n--) {
  		
    getline(cin, A);
    for(int i=0;i<A.length()-6;i++) {
    	
    if(A.substr(i,7) == "Hoshino")
    A.replace(i, 7, "Hoshina");

    }
    cout<<A<<endl;
  }
  	return 0;
}

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

int main()
{
    int n;
    cin>>n;
    getchar();
    while(n!=0){
        string str;
        getline(cin,str);
        for(int i=0;i<str.length();i++){
            if(str[i]=='H' && 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;
        n--;
    }
    return 0;
}

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

void ReplaceAll(string& s, string from, string to){
  string::size_type p = 0;
  while(p=s.find(from,p), p!=string::npos){
    s.replace(p, from.length(), to);
    p += to.length();
  }
}

int main(void){
  int n;
  string x;
  char tmp[1024];

  cin>>n;
  cin.get();
  while(n--){
    cin.getline(tmp,1024);
    x = tmp;
    ReplaceAll(x,"Hoshino","Hoshina");
    cout<<x<<endl;
  }

  return 0;
}

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

int main(){
	int num;
	std::string english;
	std::cin >> num;
	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;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
#include <string.h>
using namespace std;

#define FOR(i,s,e) for (int i = int(s); i != int(e); i++)
#define REP(i,e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int compare(const std::string& buf, const std::string& str)
{
}

int main(int argc, char const *argv[])
{
	int n;
	std::string str1 = "Hoshino";
	std::string str2 = "Hoshina";
	int len = str1.length();
	scanf("%d\n", &n);
	REP(i, n)
	{
		std::string s;
		std::getline(std::cin, s);
		int k = 0;
		int l = s.length();
		while(k+6 < l)
		{
			int n = 0;
			for (int j = 0; j < 7; j++)
			{
				if (s[k+j] != str1[j])
				{
					n = j+1;
					break;
				}
			}
			if (n == 0)
			{
				s[k + 6] = 'a';
				n = 7;
			}
			k += n;
		}
		std::cout << s << std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

int n;
string s;

int main(){
	cin >> n;
	cin.ignore();
	REP(i, n){
		getline(cin, s);
		bool f = 0;
		for (int i = 0; i < s.size() - 6; i++){
			string t = s.substr(i, 7);
			if (t == "Hoshino"){
				s[i + 6] = 'a';
			}
		}
		cout << s << endl;
	}
}

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;
	while(n--){
		while(getline(cin,s)!="\n");
		while(1){
			unsigned int loc = s.find("Hoshino");
			if(loc!=string::npos)
			s.replace(loc,d.size(),d);
			else
				break;
		}
		cout<<s<<endl;
	}
}