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++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <climits>

using namespace std;

inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}

typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)

const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
	int n;
	string str;
	
	getline(cin, str, '\n');
	n = toInt(str);

	int pos;
	REP(i, n) {
		getline(cin, str, '\n');

		while((pos = str.find("Hoshino")) != string::npos) {
			str[pos+6] = 'a';
		}

		cout << str << endl;
	}

	return 0;
}

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

int main(){
	int n;
	string in;
	cin >> n;
	for (int i = 0; i <= n;i++) {
		getline(cin, in);
		while (true) {
			int hoshi = in.find("Hoshino");
			if (hoshi >= 0) {
				in.replace(hoshi, 7, "Hoshina");
			}
			else break;
		}
		cout << in << endl;
	}
	return 0;
}

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

#define int long long

signed main() {
    int n;
    scanf("%d%*c", &n);
    for(int i=0; i<n; ++i) {
        string s;
        getline(cin, s);
        regex re("Hoshino");
        cout << regex_replace(s, re, "Hoshina") << endl;
    }
    return 0;
}

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

int main(){
    int n;
    scanf("%d ",&n);
    for(int x=0;x<n;++x){
        string line;
        getline(cin,line);
        while (line.find("Hoshino") != string::npos) {
                    line.replace(line.find("Hoshino"), 7, "Hoshina");
            }   
        cout<<line<<endl;   
    }
    return 0;
}

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

using namespace std;

int main() {
	int n; scanf("%d\n", &n);

	string rect = "Hoshino";

	for (int t = 0; t < n; ++t) {
		char c; int pos = 0;
		while ((c = getchar()) != EOF) {
			if (c != rect[pos]) pos = 0;
			else if (++pos == rect.size()) pos = 0, c = 'a';
			cout << c;
		}
	}
}

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

static const std::string MISS_STR = "Hoshino";
static const std::string CORRECT_STR = "Hoshina";

int main(void) {
    int n;
    std::cin >> n;

    // const int nn = n;

    while (0 <= n--) {
        std::string str;
        std::getline(std::cin, str);

        const unsigned int str_size = str.size();
        unsigned int cur = 0;
        std::string::size_type pos = str.find(MISS_STR, 0);

        while (pos != std::string::npos && cur <= str_size) {
            // fix miss
            for (unsigned int i = cur; i < pos; i++) {
                std::cout << str.at(i);
            }
            std::cout << CORRECT_STR;

            // increase cursor
            cur += (pos + MISS_STR.size());

            pos = str.find(MISS_STR, cur);
        }

        for (unsigned int i = cur; i < str_size; i++) {
            std::cout << str.at(i);
        }
        std::cout << std::endl;

        // std::cout << str << std::endl;
    }

    return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
  int n;
  cin >>n;
  cin.ignore();
  while(n--){
    string word;
    getline(cin,word);
    string::size_type index;
    for(;;){
      index = word.find("Hoshino");
      if(index == string::npos){break;}
      word[index+6] = 'a';
    }
    cout <<word<<endl;
  }
  return 0;
}

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

using namespace std;

int main(void) {
	int D_Set;
	
	cin >> D_Set;
	cin.ignore();
	for(int i = 0; i < D_Set; i++) {
		string text;
		getline(cin, text);
		
		while(1) {
			string::size_type pos = text.find("Hoshino");
			if(pos == string::npos)	{ break; }
			else {
				text[pos + 6] = 'a';
			}
		}
		cout << text << endl;
	}
	return 0;
}

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

int main(){
	int n;
	char c;
	std::string str,Del;
	std::cin>>n;
	std::getline(std::cin,str);
	while( --n ,std::getline(std::cin,str) , n+1 ){
		int Result;
		while( (Result = str.find("Hoshino") ) != std::string::npos )str.replace(Result,strlen("Hoshino"),"Hoshina");
		std::cout<<str<<std::endl;
	}
}

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

using namespace std;

int main()
{
    int n;
    string _;
    cin >> n;
    getline(cin, _);
    for (int i = 0; i < n; ++i) {
        string s;
        getline(cin, s);
        regex re("Hoshino");
        auto r = regex_replace(s, re, "Hoshina");
        cout << r << endl;
    }
}

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

using namespace std;

int main(){
	string s;
	getline(cin,s);
	while(getline(cin,s)){
		for(int i=0;i<s.size()-5;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+1]='a';s[i+6]='o';
			}
		}
		
		cout<<s<<endl;
		
	}

}

C++: #include <iostream>
#include <string>
using namespace std;
#define rep(j,n) for(int j = 0 ; j < 7 ; j++)

int main(){
    string str;
    int n;
    
    cin >> n;
    for(int k = 0 ; k < n ; k++){
        getline(cin,str);
        for(int i = 0 ; i < str.length() ; i++){
            string key = str.substr(i,7),repl;
            if(key == "Hoshino"){
                repl = "Hoshina";
                rep(j,n) str[i+j] = repl[j];
            }
        }
        cout << str << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int n;
  cin>>n;
  cin.ignore();
  rep(j,n){
    string s;
    getline(cin,s);
   if(s.size()<7)continue;
    rep(i,s.size()-6)if(s.substr(i,7)=="Hoshino")s.replace(i,7,"Hoshina");
    cout<<s<<endl;
  }


}

C++: #include <stdio.h>
int main(){
    int n,now;
    char a[1000],c;
    a[7]='\0';
    while(scanf("%d\n",&n)!=EOF){
        now=0;
        while(now<n){
            scanf("%s",a);
        if(a[0]=='H'&&a[1]=='o'&&a[2]=='s'&&a[3]=='h'&&a[4]=='i'&&a[5]=='n'&&a[6]=='o'&&a[7]=='\0')printf("Hoshina");
        else printf("%s",a);
        scanf("%c",&c);
        printf("%c",c);
            if(c=='\n')now++;
            a[7]='\0';
    }
    }
}