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 <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);

        // :(
        if (nn - 1 == n) {
            continue;
        }

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

    return 0;
}

C++: #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
const double EPS = 1e-10;

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

C++: #include <string>
#include <iostream>
#include <cstdio>
int main(){
	int n;
	std::cin>>n;
	std::string s;
	std::cin.ignore();
	for(int i=0;i<n;++i){
		std::getline(std::cin,s);
		/*for(int j=0;j<s.size()-6;++j){
			if(s[j]=='H' && s[j+1] == 'o' && s[j+2] == 's'&& s[j+3] == 'h'&& s[j+4] == 'i'&& s[j+5] == 'n'&& s[j+6] == 'a')s[j+6]='a';
		}*/
		while(s.find("Hoshino") != std::string::npos){
			s[s.find("Hoshino")+6]='a';
			//std::cout<<s.find("Hoshino")<<std::endl;
		}
		//std::cout<<"tes"<<std::endl;
		std::cout<<s<<std::endl;
	}
	return 0;
}

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

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	string s;
	int n;
	cin>>n;
	cin.ignore();
	for(int i=0;i<n;i++){
		getline(cin,s);
		while(1){
			if(s.find("Hoshino")==string::npos) break;
			s.replace(s.find("Hoshino"),7,"Hoshina");
			}
		cout<<s<<endl;
		}
}

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

int main(){
  int n;
  char c,tmp;
  int f;

  cin >> n;
  getchar();

  f = 0;
  while(n){
    c = getchar();

    if(f == 0 && c == 'H')f++;
    else if(f == 1){
      if(c == 'o')f++;
      else f = -1;
    }else if(f == 2){
      if(c == 's')f++;
      else f = -1;
    }else if(f == 3){
      if(c == 'h')f++;
      else f = -1;
    }else if(f == 4){
      if(c == 'i')f++;
      else f = -1;
    }else if(f == 5){
      if(c == 'n')f++;
      else f = -1;
    }else if(f == 6){
      if(c == 'o'){
	tmp = getchar();
	if(tmp == '\n' || tmp == ' ')putchar('a');
	else putchar(c);
	c = tmp;
      }
      f = -1;
    }

    if(c == '\n'){
      n--;
      f = 0;
    }else if(c == ' ')f = 0;

    putchar(c);
  }
}

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 == EOF) break;
			if (c == '\r' || c == '\n') break;

			cout << " ";
		}
		cout << endl;
	}
}

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

std::string false = "Hoshino";
std::string true = "Hoshina";

int main(){
	int num;
	std::string english;
	std::cin >> num;

	for(int i=0;i<num;i++){
		std::cin >> english;
		for(int j=0;j<english.lemgth();j++){
			if(english[j]==false) english[j]=true;
		}
	}

    return 0;
}

C++: import string

n=int(input())

for i in range(n):
    print(input().replace("Hoshino", "Hoshina"))

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;
typedef pair<int, int> pii;
#define MAX 99999999
int main(){
    int n;cin>>n;
    char c; scanf("%c",&c);
    rep(p,n){
        string s;
    getline(cin,s);
            rep(i,s.length()){
        int b=(int)s.find("Hoshino",i);
        if(b!=-1)s.replace(b+i,7,"Hoshina");
    }
        cout<<s<<endl;
    }
return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
using namespace std;
int main(){
	int n;
	scanf("%d\n",&n);
	while(n--){
		string s;
		getline(cin,s);
		while(s.find("Hoshino")!=-1) s.replace(s.find("Hoshino"),7,"Hoshina");
		cout<<s<<"\n";
	}
	return 0;
}

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

using namespace std;

int main(void)
{
	int n;
	string a;
	string g = "Hoshino";

	cin >> n;
	cin.ignore();
	for (int i = 0; i < n; ++i){
		string::size_type x;
		getline(cin, a);
		while(x = a.find("Hoshino"), x != string::npos)
			a.replace(x, 7, "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
using namespace std;

int main(){

  int n;
  char *str;

  scanf("%d",&n);

  for(int i=0;i<n;i++){
   
    while(scanf("%s",str)!=EOF){
      if(strcmp(str,"Hoshino")==0){
	printf("Hoshina");
      }
      else {
	printf("%s",str);

      }

    }
    printf("\n");

  }

  return 0;
}

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

int main(){
  int n;
  int i = 0;
  std::string str;
  std::string fr = "Hoshino";
  std::string to = "Hoshina";
  std::string::size_type ch;

  std::cin >> n;

  while(n > 0){
    
    //文字列の読み込み
    while(std::cin >> str){
    //"Hishino"を"Hoshina"に変換
        ch = str.find(fr);
        while(str.find(fr) != std::string::npos){
            str.replace(str.find("Hoshino"),fr.size(), to);
            ch = str.find(fr,ch+to.size());
            
    }
        std::cout << str << " " << std::flush;
        }
      --n;
      
}
}