Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	var n int
	fmt.Scanf("%d", &n)

	result := make([]string, n, n)

	for i := 0; i < n; i++ {
		scanner.Scan()
		input := scanner.Text()

		result[i] = strings.Replace(input, "Hoshino", "Hoshina", -1)
	}

	for _, v := range result {
		fmt.Println(v)
	}
}

C++: #define _USE_MATH_DEFINES
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>
#include <iterator>

using namespace std;

typedef long long ll;
typedef pair<int,int> Pii;
typedef pair<ll,ll> Pll;

 
int main(){
	int t;
	string s;
	cin>>t;
		getline(cin,s);
	while(t--){
		getline(cin,s);
		int x;
		while((x = s.find("Hoshino")) != string::npos){
			s[x+6] = 'a';
		}
		cout << s << 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);
		for(int j=0;j<s.size();j++){
			if(s.substr(j,7)=="Hoshino")
				s[j+6]='a';
		}
		cout<<s<<endl;
	}
	return 0;

}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int n;
	int i;
	while(cin >> n){
		i=n;
		string s[n];
		cin.ignore();
		while(n--){
			getline(cin,s[n]);
			int ix=0;
			while( ( ix =s[n].find("Hoshino") ) >=0 ){
				s[n].replace(ix,7,"Hoshina");
			}
		}
		while(i--){
			cout << s[i] << endl;
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
    
    cin.tie( 0 );
    ios::sync_with_stdio( false );
    
    int n;
    cin >> n;
    cin.ignore(); //<-----!!!!!!!!!!
    string s;
    
    while( getline(cin, s) ){
        
        string tmp = s;
        bool flag = false;
        auto pos = s.find( "Hoshino" );
        
        while( pos != string::npos ){
            
            if( pos != string::npos ){
                
                s.replace( pos, 7, "Hoshina" );
                pos = s.find( "Hoshino", pos , 7 );
                flag = true;
            }
        }
        cout << ( flag ? s : tmp ) << endl;
    }
    return 0;
}

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

void strReplace(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(){
	int n;
	cin >> n;
	cin.clear();
	cin.ignore();
	for(int i = 0; i < n; i++){
		string s;
		getline(cin, s);
		strReplace(s, "Hoshino","Hoshina");
		cout << s << endl;
	}
}

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){
			int find = english.find("Hoshino");
			english.replace(find, find+7, "Hoshina");
		}
		std::cout << english << std::endl;
	}
    return 0;
}

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

using namespace std;

int main()
{
    int n;
    cin >> n;
    char _;
    cin >>  _;
    for (int i = 0; i < n; ++i) {
        string s;
        getline(cin, s);
        stringstream ss;
        ss << s;
        string t;
        while (getline(ss, t, ' ')) {
            if(t== "Hoshino") {
                cout << "Hoshina";
            } else {
                cout << t;
            }
            cout << ' ';
        }
        cout << endl;
    }
}

C++: 
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

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

	rep(i, n)
	{
		string str;

		cin.sync();
		getline(cin, str);

		rep(j, str.size() - 6)
			if(str.substr(j, 7) == "Hoshino")
				str[j + 6] = 'a';

		cout << str << endl;
	}
}

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

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

	cin >> n;

	for (int i = 0; i < n; i++){
		fgets(str, sizeof(str), stdin);

		for (int j = 0; j < strlen(str) - 6; j++){
			if (strncmp(&str[j], "Hoshino", 7) == 0){
				str[j + 6] = 'a';
			}
		}

		cout << str;
	}

	return (0);
}

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

int main(){
  int n;
  char c;
  string text;
  cin>>n;
  getline(cin,text,'\n');
  for(;n>0;n--){
    getline(cin,text,'\n');
    while(text.find("Hoshino")!=-1){
      int f = text.find("Hoshino");
      text = text.substr(0,f)+"Hoshina"+text.substr(f+7);
    }
    cout<<text<<endl;
  }
  return 0;
}

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

int main()
{
  int n;
  std::cin >> n;
  std::cin.ignore();
  
  for (int i = 0; i < n; ++i) {
    std::string str;
    std::getline(std::cin, str);
    
    auto pos = str.find("Hoshino", 0, 7);
    while (pos != std::string::npos) {
      str.replace(pos, 7, "Hoshina", 7);
      pos = str.find("Hoshino", pos, 7);
    }

    std::cout << str.c_str() << std::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) {
		char str[2000];
		while (scanf("%s", str) != EOF) {
			for (int i = 0; str[i]; ++i) {
				for (int j = 0; j < rect.size() && str[i+j]; ++j) {
					if (str[i+j] != rect[j]) break;
					else if (j == rect.size()-1) str[i+j] = 'a';
				}
			}

			cout << str;

			char c = getchar();
			if (c == '\r' || c == '\n') { cout << endl; break; }
			if (c != ' ') break;

			cout << " ";
		}
	}
}

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

using namespace std;
int main(){
	int n,i,j,h;
	char *p;
	char buf[1100];
	string str;
	string hit="Hoshino";
	cin>>n;
	string tmp;
	getline(cin,tmp);
	for(int j=0;j<n;j++){
		if(j)cout<<endl;
		string buf;
		getline(cin,buf);
		if(buf.size()==0)break;
		stringstream ss(buf);
		for(int i=0;ss >> str;i++){
			if(i)cout<<" ";
			for(int i=6;i<str.size();i++){
				string sub="";
				for(int j=i-6;j<=i;j++)sub+=str[j];
				if(sub==hit)str[i]='a';
			}
			cout<<str;
		}
	}
	return 0;
}