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<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;
#define MAX_SIZE 10000
typedef pair<int, int> pii;
#define MAX 99999999

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;
        }
        cout << endl;
    }
    return 0;
    
}

C++: #include <iostream>
#include <string>
#include <cstdio>
using namespace std;
int main(){
  int n ,i ,index;
  string s;
  cin >> n;

  i = 0;
  while( i < n ){
    getline(cin ,s);
    while( true ){
      string::size_type index = s.find( "Hoshino" );
      if( index != string :: npos ){
	s.replace( index ,7 ,"Hoshina" );
      }
      else{
	break;
      }
    }
    cout << s << endl;
  }

  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;
typedef pair<int,string>P;

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

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

int main()
{
  string str;
  int n;
  cin >> n;
  for (int j = 1; j <= n; j++){
    getline(cin, str);
    for (int i = 0; i < str.size(); i++){
      if (str[i] == 'H' && str[i + 1] == 'o' && str[i + 2] == 's' && str[i + 3] == 'h' && str[i + 4] == 'i' && str[i + 5] == 'n' && str[i + 5] == 'o'){
        str[i + 5] = 'a';
      }
    }
    cout << str << endl;
  }
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<ctime>
#include<cctype>
#include<climits>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<memory>
#include<functional>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;

typedef vector<int> vi;
typedef vector<long long> vl;
typedef vector<double> vd;
typedef pair<int, int> pii;
typedef pair<long, long> pll;
typedef long long ll;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };

int main(){
	ios::sync_with_stdio(false);

	string str1, str2, str3;

	str2="Hoshino";
	str3="Hoshina";

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

	while(n--){

		getline(cin, str1);

		string::size_type pos = str1.find(str2);

		while(pos!=string::npos){
			str1.replace(pos, str2.size(), str3);
			pos=str1.find(str2, pos+str3.size());
		}

		cout<<str1<<endl;
	}

}

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);
        u_int index =  0;
        
        while((index = text.find(str_false, index)) != std::string::npos)
            text.replace(index, str_false.size(), str_true);
        std::cout  << text << std::endl;
    }
    
    return 0;
}

C++: feawfae

C++: #include <stdio.h>
#include <string.h>
 
int main()
{
    int n;
    char *p;
    char str[1000];
    scanf("%d\n",&n);
    while(n--){
    gets(str);
    for(p;p=strstr(str,"Hoshino");)p[6]='a';
    puts(str);
    }
    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);
		if ((x = a.find("Hoshino")) != string::npos)
			a.replace(x, 7, "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
const string a="Hoshino",b="Hoshina";
signed main(void){
	int n;scanf("%d",&n);getchar();
	for(int t=1;t<=n;t++){
		string s;
		getline(cin,s); 
		for(int i=0;i<s.length();i++){
			bool flag=true;
			for(int j=0;j<7;j++)
				if(s[i+j]!=a[j]){
					flag=false;
					break;
				}
			if(flag){
				s[i+6]='a';
				i+=6;
			}
		}
		cout<<s<<endl;
	}
}

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

using namespace std;

int main(){
	
	int n;
	
	string str;
	
	cin >> n;
	
	cin.ignore();
	for(int loop = 0; loop < n; loop++){
		getline(cin, str);
		
		for(int i = 0; i < str.size() - 6; i++){
			if(str[i] == 'H' && str[i + 1] == 'o' && str[i + 2] == 's' && str[i + 3] == 'h' && str[i + 4] == 'i' && str[i + 5] == 'n' && str[i + 6] == 'o'){
				str[i + 6] = 'a';
			}
		}
		
		cout << str << endl;
	}
	
	return 0;
}

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

int main(){
  int n,j;
  string str;
  cin >> n;
  getline(cin, str);
  for(int i = 0; i<n;i++){

    getline(cin, str);

    j = 0;
    while(str.size() >= 7 && str[j+6] != '\0'){
      if(str[j] == 'H' && str[j+1] == 'o' && str[j+2] == 's' && str[j+3] == 'h' && str[j+4] == 'i' && str[j+5] == 'n' && str[j+6] == 'o') str[j+6] = 'a';
      j++;
    }
    cout << str << endl;
  }
    
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <map>
#include <cstdio>
#include <cstdlib>

#define rep(i, n) for(int i = 0; i < n; i ++)
#define ALL(T) T.begin(), T.end()

using namespace std;

typedef pair<int, int> pii;
typedef unsigned long long ull;

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

    while(n --){
        string in; getline(cin, in);
     
        while(1){
            int diff;
            if(!~(diff = in.find("Hoshino"))) break;
            in.replace(diff, 7, "Hoshina");
        }
        cout << in << endl;
    }

    return 0;
}