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<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  for(int i=0;i<n;i++){
    string str;vector<string> vs;
    vs.clear();
    while(cin>>str){
      if(str=="Hoshino"){
	vs.push_back("Hoshina");
      }else
	vs.push_back(str);
    }
    for(int j=0;j<vs.size();j++){
      cout<<vs[j];
      if(j!=vs.size()-1)
	cout<<" ";
    }
    cout<<endl;
  }
  return 0;
}

C++: //#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

int main(){
    
    int n;
    cin >> n;
    //	cout << n << endl;
    int j;
    bool checking  = true;
    for( j = 0; j<=n; j++)
    {
        checking = true;
        char s[MAX_SIZE] = {};
        gets(s);
        int i = 0;
        while(*(s+i) != '\0')
        {
            //printf("%c",*(s+i));
            bool check = true;
            if(*(s+i) == 'H')
                if(*(s+i+1) == 'o')
                    if(*(s+i+2) =='s' )
                        if(*(s+i+3) =='h' )
                            if(*(s+i+4) == 'i')
                                if(*(s+i+5) == 'n' )
                                    if(*(s+i+6) == 'o')
                                    {
                                        cout << "Hoshina";
                                        i+=7;
                                        check = false;
                                        checking = check;
                                    } 
            if(*(s+i) != 'H' || check  == true)
            {
                printf("%c",*(s+i));
                i++;
                checking = true;
            }
        }
        if(j != n && j != 0)
            cout << endl;
        
    }
    cout << endl;
    return 0;
    
}

C++: //#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

int main(){
    
    int n;
    cin >> n;
    //	cout << n << endl;
    int j;
    bool checking  = true;
    for( j = 0; j<=n; j++)
    {
        checking = true;
        char s[MAX_SIZE] = {};
        gets(s);
        int i = 0;
        while(*(s+i) != '\0')
        {
            //printf("%c",*(s+i));
            bool check = true;
            if(*(s+i) == 'H')
                if(*(s+i+1) == 'o')
                    if(*(s+i+2) =='s' )
                        if(*(s+i+3) =='h' )
                            if(*(s+i+4) == 'i')
                                if(*(s+i+5) == 'n' )
                                    if(*(s+i+6) == 'o')
                                    {
                                        cout << "Hoshina";
                                        i+=7;
                                        check = false;
                                        checking = check;
                                    } 
            if(*(s+i) != 'H' || check  == true)
            {
                printf("%c",*(s+i));
                i++;
            }
            checking = true;
        }	
        //if(j)cout << endl;
        /*if(checking == false)
        {
            cout << endl;
            checking = true;
        }*/
        if(j != 0)cout << endl;
    }
    return 0;
    
}

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

int main(void){
	int n,i,j;
	char a[55];
	cin >> n;
	getchar();
	for(j=0; j<n; j++){
		i = 0;
		while(true){
			a[i] = getchar();
			if(a[i]=='\n'){
				putchar('\n');
				break;
			}else if(a[i]=='o' && i > 6){
				if(a[i-6] == 'H' && a[i-5] == 'o' && a[i-4] == 's' && a[i-3] == 'h' && a[i-2] == 'i' && a[i-1] == 'n'){
					putchar('a');
				}else{
					putchar(a[i]);
				}
			}else{
				putchar(a[i]);
			}
			i++;
		}
	}
	return 0;
}

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

int main()
{
    const std::string str_false = "con";
    const std::string str_true = "Hoshina";

    u_int num_of_data;
    std::cin >> num_of_data;
    std::cin.ignore();
    
    for(u_int i = 0; i < num_of_data; ++i){
        std::string text;
        getline(std::cin, text);
        
        std::string::size_type index = 0;
        while((index = text.find(str_false, index)) != std::string::npos){
            text.replace(index, str_false.size(), str_true);
            index += str_true.size();
        }
        std::cout  << text << std::endl;
    }
    
    return 0;
}

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

int main()
{
    const std::string str_false = "Hoshino";
    const std::string str_true = "Hoshina";

    u_int num_of_data;
    std::string text;
    std::cin >> num_of_data;
    std::cin.ignore();
    
    for(u_int i = 0; i < num_of_data; ++i){
        getline(std::cin, text);
        int index;
        
        while((index = text.find(str_false, index)) != (int)std::string::npos)
            text.replace(index, str_false.size(), str_true);
        std::cout  << text << std::endl;
    }
    
    return 0;
}

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

using namespace std;

int main()
{
   string str;

   getline( cin, str);

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

   cout << str << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    cin >> n;
    cin.ignore();
    for (int _ = 0; _ < 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 << "\n";
    }
    return 0;
}

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

using namespace std;

int main(){
	string text;
	int n,j;
	int i;
	
	cin>>n;
	for(j=0;j<n;j++){
	 cin>>text;
	 while(1){
	  i=text.find("Hoshino");
	  if(i!=string::not_found){
	   text[i+6]='a';
	  }else{
	   break;
	  }
	 }
	 cout<<text<<endl;
	}
}

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

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

	scanf("%d", &n);
	for (int i = 0; i < n+1; i++) {
		fgets(str, 1001, stdin);
		str[strlen(str) - 1] = '\0';

		if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
		puts(str);
	}

	return 0;
}

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

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

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

	cin >> n;

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

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

		cout << str << endl;
}

	return (0);
}