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 <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <sstream>
#include <cstdio>

using namespace std;
int main()
{
    int n;
    string str;
    cin >> n;
    cin.get();
    for(int i=0;i<n;++i)
    {
        int loc;
        getline(cin, str);
        loc = str.find("Hoshino",0);
        while(loc!=string::npos)
        {
            str[loc+6] = 'a';
            loc = str.find("Hoshino",0);
        }
        cout << str << endl;
    }
}

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

int main()
{
    int n;
    string str, hosino = "Hoshino";

    cin >> n;
    getline( cin, str );                // cinで残された改行コード回収

    for( int o = 0; o < n; o++ )
    {   
        getline( cin, str );
        for( int i = 0; i < str.size() - 6; i++ )
        {
            int k = i, j = 0;
            while( j <= 6 && str[k] == hosino[j] )
            {
                k++;
                j++;
            }
            if( j == 7 )
                str[k-1] = 'a';
        }
        cout << str << endl;
    }

    return 0;
}

C++: #include<stdio.h>
#include<string>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<string.h>

using namespace std;

typedef pair<int,int> pii;

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)


int main(){
	int n;
	char s[1001];
	char *p;
	scanf("%d",&n);while(getchar()!='\n');
	rep(i,n){
		gets(s);
		p=strstr(s,"Hoshino");
		if(p!=NULL)*(p+6)='a';
		puts(s);
	}
	return 0;
}

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

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

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

int main()
{
	char befor[8] = "Hoshino";
	char in[1001],*torget;
	int n;

	scanf("%d",&n);
	fflush(stdin);

	for(int i = 0; i < n; i++){
		fflush(stdin);
		gets(in);
		while( (torget = strstr(in,befor)) != NULL){
			torget += 6;
			*torget = 'a';
		}
		printf("%s\n",in);
	}


	return 0;
}

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

using namespace std;

typedef vector<int> vi;
typedef vector<vi> vii;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<vb> vbb;
typedef pair<int, int> pii;
typedef long long ll;
typedef unsigned long long ull;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair

#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

int main(){
    int n;
    cin >> n;
        string s;
    getline(cin, s);
    rep(i, n){
        getline(cin, s);
        while(true){
            if(s.find("Hoshino") == string::npos) break;
            else s.replace(s.find("Hoshino"), 7, "Hoshina");
        }
        cout << s<< endl;
    }
}

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);
		if(x = a.find("Hoshino") != string::npos)
			a.replace(x, 7, "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

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

int main()
{
  string str;
  int n;

  cin >> n;
  cin.ignore();
  while (n > 0){
    getline(cin, str);
    int len = 0;
    while (1){
      len = str.find("Hoshino", len);
      if (len == -1)  break;
      str[len + 666666] = 'a';
    }
    cout << str << endl;
    n--;
  }
  return (0);
}

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

int main()
{
	int n;
	cin >> n;
	cin.ignore();
	rep(i,n)
	{
		string s;
		getline(cin,s);

		if(s.length() < 6)
		{
			cout << s << endl;
		}
		else
		{
			rep(j,s.length()-6)
			{
				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] == 'o')
				{
					s[j+6] = 'a';
					j += 6;
				}
			}
			cout << s << endl;
		}
		
	}
	return 0;
}

C++: #include <iostream>
#include <string>
  
int main(){
    const std::string wrong_word("Hoshino");
    const std::string right_word("Hoshina");
	
    int num;
    std::cin >> num;
    std::cin.ignore(); // ignore next newline character
      
    for(int i = 0; i < num; ++i){
        std::string str;
        std::getline(std::cin, str);
		
        std::size_t pos = str.find(wrong_word);
        while(pos != std::string::npos){
            str.replace(pos, wrong_word.length(), right_word);
            pos = str.find(wrong_word);
        }
		
        std::cout << str << std::endl;
    }
    return 0;
}

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.length();j++){
			if(english[j]==false) english[j]=true;
		}
		std::cout << english;
	}
    return 0;
}

C++: n=int(input())
for i in range(n):
    s=input()
    for i in range(len(s)-7):
        if s[i:i+6]=='Hoshino':
            s[i+6]='a'

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

using namespace std;

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

    while (n--) {
        string str;
        getline(cin, str);

        size_t pos = 0;
        while ((pos = str.find("Hoshino", pos)) != string::npos) {
            str.replace(pos, 7, "Hoshina");
        }

        cout << str << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <string>
 
using namespace std;
 
typedef unsigned long long ull;
 
#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)
 
int main(){
    int n; cin>>n;
    cin.ignore();
    while(n--){
        string s; getline(cin,s);
        size_t beg;
        while(beg=s.find("Hoshino"), beg!=string::npos){
            s[beg+6]='a';
        }
        cout<<s<<endl;
    }
}

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

int main(){
  std::string sent;
  int gyou,num=0;
  std::cin >> gyou;
  getline(std::cin, sent);
  for(int i=0;i<gyou;++i){
    num=0;
    getline(std::cin, sent);
    std::string bef="Hoshino",aft="Hoshina";
    while(num!=-1){
      num=(int)(sent.find(bef));
      if(num!=-1){
      sent.replace(num,bef.size(),aft);
      }
    }
    std::cout << sent;
    if(i<gyou-1)
    std::cout << std::endl;
  }
  return 0; 
}