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 <string>

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	std::string str;
	
	while(std::cin >> str){

		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){
			 std::replace(pos, find_word.length(), correct_word);
			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
  int n;
  cin>>n;
  cin.ignore();
  string line;
  string s = "Hoshina";
  while((getline, line))
  {
   string("Hoshino"!=string::npos)
   line=s;
    }
  cout<<line<<endl;
  return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); ++i)
int main() {
	int n;
	cin >> n;
	char *ho = "Hoshino";
	rep(i,n+1) {
		char c, s[2010];
		rep(j, 2000) {
			scanf("%c", &c);
			if(c == '\n') {
				s[j] = '\0';
				break;
			} else {
				s[j] = c;
			}
		}
		for(int j = 0; s[j] != '\0'; ++j) {
			int f = 1;
			rep(k,7) {
				if(s[j + k] != ho[k]) {
					f = 0;
					break;
				}
			}
			if(f) s[j + 6] = 'a';
		}
		if(i != 0) {
			printf("%s",s);
			cout << endl;
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int n;
  cin >> n;
  string str;
  getline(cin, str);
  rep (iii, n) {
    getline(cin, str);
    rep (i, str.size() - 6) {
      if (str.substr(i, 7) == "Hoshino") str[i + 6] = 'a';
    }
    cout << str << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	string str, judge = "";
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		if (i == 0) { getline(cin, str); }
		getline(cin, str);
		for (int j = 0; j < str.size(); j++) {
			judge += str[j];
			if(str[j] < 'A' && str[j] > 'z' || str[j]==' '  ){
				cout << judge;
				judge = "";
			}
			if (judge == "Hoshino" && str[j + 1] >= 'A' && str[j + 1] <= 'z') {
				cout << judge;
				judge = "";
			}
			if (judge == "Hoshino") {
				cout << "Hoshina";
				judge = "";
			}
			else if (j == str.size() - 1) {
				cout << judge;
				judge = "";
			}
		}
		cout << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<climits>
#include<string>
#include<vector>
#include<list>
#include<map>
#include<set>
#include<cmath>
#include<queue>
#include<cstring>
using namespace std;

int main(){
	int N;
	cin>>N;
	fflush(stdin);
	while(N--){
		char S[1001];
		for(int i=0;;i++){
			scanf("%c",&S[i]);
			if(S[i]=='\n'){
				S[i] = '\0'; break;
			}
		}
		int len = strlen(S);
		for(int i=0;i<len;i++){
			if(strncmp(S+i,"Hoshino",7)==0){
				printf("Hoshina"); i += 6;
			}
			else printf("%c",S[i]);
		}puts("");
	}
    return 0;
}

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

int main(void){
  char sentence[1050];
  int n;
  scanf("%d\n",&n);
  for(int i=0;i<n;i++){
        for(int j=0;j<1050;j++){
            sentence[j]=getchar();
            if(sentence[j]=='\n'){
                sentence[j]=0;
                break;
            }
        }
    for(int j=0;j<1025;i++){
        if(sentence[j]==0)break;
        if(!strncmp(sentence+j,"Hoshino",7)){
            sentence[j+6]='a';
        }
    }
    puts(sentence);
  }
  return 0;
    
}

C++: using System;

namespace TestProject
{
	class MainClass
	{
		public static void Main(string[] args)
		{
			int n = int.Parse(Console.ReadLine());
			string s0 = "Hoshino";
			string s1 = "Hoshina";
			string[] s = new string[n];
			for (int i = 0; i < n; i++)
			{
				s[i] = Console.ReadLine();
				s[i] = s[i].Replace(s0, s1);
			}
			foreach (var x in s)
			{
				Console.WriteLine(x);
			}
		}
	}
}

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

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	std::string str;
	
	int N;

	std::cin >> N;

	for(int i = 0; i < N; ++i){
		
		std::cin >> str;
		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){
			 str.replace(pos, find_word.length(), correct_word);
			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	}
	return 0;
}

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

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	
	int N;

	std::cin >> N;

	for(int i = 0; i < N; ++i){
	
		std::string str;
		std::cin >> str;

		std::string::size_type pos = str.find("Hoshino");
		
		while(pos != std::string::nops){

			 str.replace(pos, find_word.length(), correct_word);

			 pos = str.find(find_word, pos + find_word.length());
		}
	
	std::cout << str << std::endl;
	
	}
	return 0;
}

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

int main() {
	int n;
	cin >> n;
	getchar();
	while (n--) {
		vector<string> result;
		string line,word;
		getline(cin,line);
		istringstream stream(line);
		while (stream >> word) {
			auto hoshino_pos = word.find("Hoshino");
			if (hoshino_pos != string::npos) {
				word.replace(hoshino_pos + 6,1,"a");
			}
			result.push_back(word);
		}
		for (auto itr = result.begin();itr != result.end();++itr) {
			cout << *itr << (itr + 1 == result.end() ? "\n" : " ");
		}
	}
}

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

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