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 <cstring>
using namespace std;

int main(){
	long long int n;
	char* a;
	char letter[1000];
	while(cin >> n){
		for(int i=0 ; i<n ; i++){
			cin >> letter;
		}
		do {
			a=strstr(letter , "Hoshino");
			if (a==NULL) break;
			strncpy(a , "Hoshina" , 7);
			
		} while (a!='\0');
		cout << letter << endl;
		n--;
		if (!n) break;
	}
	return 0;
}

C++: #include <sstream>
#include <iostream>
#include <array>

int main(){
    int line_num = 0;
    std :: string ori_sentence, new_sentence, word;
    std :: cin >> line_num;
    //std :: getline(std :: cin, ori_sentence);
    for(int i = 0;i <= line_num;i++){
        std :: getline(std :: cin, ori_sentence);
        std :: stringstream ss(ori_sentence);
        new_sentence = "";
        while(std :: getline(ss, word, ' ')){
            if(word == "Hoshino"){
                word = "Hoshina";
            }
            if(new_sentence != ""){
                new_sentence += (' ' + word);                
            } else {
                new_sentence += word;                
            }
        }
        std :: cout << new_sentence << std :: endl;
    }
}

C++: #include <stdio.h>
int main(){
    int n,now;
    char a[1000],c;
    while(scanf("%d",&n)!=EOF){
        scanf("\n");
        now=0;
        while(now<n){
            scanf("%s",a);
        if(a[0]=='H'&&a[1]=='o'&&a[2]=='s'&&a[3]=='h'&&a[4]=='i'&&a[5]=='n'&&a[6]=='o')printf("Hoshina");
        else printf("%s",a);
        scanf("%c",&c);
        printf("%c",c);
            if(c=='\n')now++;
    }
    }
}

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

static void inputSentences(std::vector<std::string>& sentences, int n)
{
  fflush(stdin);
  for (int i = 0; i < n; i++) {
    std::string inputSentence;
    getline(std::cin, inputSentence);
    sentences.push_back(inputSentence);
  }
}

static void convertSentences(std::vector<std::string>& sentences)
{
  for (std::vector<std::string>::iterator it = sentences.begin();
    it != sentences.end();
    ++it) {
    while (true) {
      int find = it->find("Hoshino");
      if (find == std::string::npos) {
        break;
      }
      it->at(find + 6) = 'a';
    }
  }
}

static void outputSentences(std::vector<std::string>& sentences)
{
  for (std::vector<std::string>::iterator it = sentences.begin();
    it != sentences.end();
    ++it) {
    std::cout << *it << std::endl;
  }
}

int main(void)
{
  int n;
  std::vector<std::string> sentences;

  std::cin >> n;

  inputSentences(sentences, n);
  convertSentences(sentences);
  outputSentences(sentences);

  return 0;
}

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

int main(void)
{
	string str;
	int n;


	cin >> n;
	while(--n,n>=0){
		getline(cin,str);

		for(int i = 0; i < str.length()-8; i++){
			if(str.substr(i,7) == "Hoshino")
				str[i+6] = 'a';
		}
		cout << str << endl;
	}
	return 0;
}

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

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

	}
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
int main(void)
{
	int ct;
	char *rp;
	char retu[1000],s[]="Hoshina";
	scanf_s("%d",&ct);
	fflush(stdin);
	for(int f1=0;f1<ct;f1++){
		gets_s(retu);
		while(1){
			if(strstr(retu,"Hoshino")==NULL){
				break;
			}
			if(rp=strstr(retu,"Hoshino")){
				rp+=6;
				*rp='a';
			}
		}
		printf("%s\n",retu);
	}
	return 0;
}

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

int main()
{
	char in[1002];
	int n;
	char hoshina[] = {"Hoshina"};
	string words;
	string::size_type hed;

	cin >> n;
	fflush(stdin);

	for(int i = 0; i < n; i++){
		fgets(in,1000,stdin);
		words = in;
		while(words.find("Hoshino ") != string::npos){
			hed = words.find("Hoshino ");
			for(int j = 0; j < 7; j++){
				words[hed] = hoshina[j];
				hed++;
			}
		}
		if(words.find("Hoshino\0") != string::npos){
			hed = words.find("Hoshino\0");
			for(int j = 0; j < 7; j++){
				words[hed] = hoshina[j];
				hed++;
			}
		}
		cout << words;
	}

	return 0;
}

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

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

	for(int i=0;i<num;i++){
		std::cin >> english;
		while(english.find("Hoshino") != -1){
			int find = str.find("Hoshino");
			english.replace(find, find+6, "Hoshina");
		}
		std::cout << english;
	}
    return 0;
}