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>
using namespace std;
int main(){
	string str;
	int n;
	cin>>n;
	while(n>=0){
	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+6]=='o')str[i+6]='a';
	n--;
	cout<<str<<endl;
	}
}

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

std::string& replace_all(std::string& str, const std::string& from, const std::string& to) {
    std::size_t start_pos = 0;
    while( (start_pos = str.find(from, start_pos)) != std::string::npos ) {
        str.replace(start_pos, from.length(), to);
        start_pos += to.length();
    }
    return str;
}

int main(void) {
    u_int n;
    std::string str;
    const std::string from  = "Hoshino";
    const std::string to    = "Hoshina";

    std::cin >> n;
    std::cin.ignore(); // ignore next newline character
    for (u_int i = 0; i < n; ++i) {
        std::getline(std::cin, str);
        std::cout << replace_all(str, from, to) << std::endl;
    }

    return 0;
}

/* requre clang or gcc 4.9 or later */
/*
#include <iostream>
#include <string>
#include <regex>

int main(void) {
    int n;
    std::string str;
    std::regex regexp("Hoshino");

    std::cin >> n;
    std::cin.ignore();
    for (int i = 0; i < n; ++i) {
        std::getline(std::cin, str);
        std::cout << std::regex_replace(str, regexp, "Hosina") << std::endl;
    }

    return 0;
}
*/

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

int main(void){
  int n;  
  
  cin >> n;
  cin.ignore();
  for (int i=0; i<n; i++){
    string str;
    string::size_type pos;
    getline(cin, str);
    while ((pos = str.find("Hoshino")) != string::npos){
      str[pos+6] = 'a';
    }
    cout << str << endl;
  }
  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!=-1){
	   text[i+6]='a';
	  }else{
	   break;
	  }
	 }
	 cout<<text<<endl;
	}
}

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

using namespace std;

int main()
{
	int n;
	cin >> n;
	char ch;
	cin.get(ch);
	for(int i = 0;i < n;i++)
	{
		string str;
		while(1)
		{
			char inch;
			cin.get(inch);
			if(inch == '\n') break;
			str += inch;
		}
		while(1)
		{
			string::size_type idx = str.find("Hoshino");
			if(idx == string::npos) break;
			str[idx + 6] = 'a';
		}
		cout << str << endl;
	}
	
	return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>

int main(){
	char str[1000];
	int n;
	char *c;
	scanf("%d\n", &n);
	for(int i = 0; i < n; i++){
		fgets(str, sizeof(str), stdin); 
		while((c = strstr(str, "Hoshino")) != NULL) c[6] = 'a';
		printf("%s", str);
	}
	return 0;

}

C++: #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
  int n;
  string s;
  string::size_type t;
  cin >> n;
  getchar();
  while (n--) {
    getline(cin, s);
    t = 0;
    while ((t = s.find("Hoshino", t)) != string::npos) {
      s[t + 6] = 'a';
      t += 1;
    }
    cout << s << endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  string str;
  int n;
  cin >> n;
  cin.ignore();
  while(n--){
  getline(cin,str);

    for(int pos = str.find("Hoshino") ; pos != string::npos ;
	pos = str.find("Hoshino",7 + pos ))
      {
	str.replace(pos,7,"Hashina");
      }
    cout << str << endl;
  }
  return 0;
}

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

string changestr(string,string::size_type);

int main(){
  int n;
  string str="";
  string::size_type st;

  cin>>n;
  for(int i=0;i<n;i++){
	 for(;;){
		getline(cin,str);
		if(str!="") break;
	 }

	 st=str.find("Hoshino");
	 while(st!=string::npos){
		str=changestr(str,st);
		st=str.find("Hoshino");
	 }
	 cout<<str<<endl;
  }
  return 0;
}

string changestr(string str,string::size_type st){
  string name="Hoshina";
  for(int i=0;i<7;i++) str[st+i]=name[i];

  return str;
}

C++: #include<stdio.h>
#include<string.h>
int main(void)
{
	int ct,len;
	char *rp;
	char retu[1000],s[]="Hoshina";
	scanf("%d",&ct);
	fflush(stdin);
	for(int f1=0;f1<ct;f1++){
		gets(retu);
		if(rp=strstr(retu,"Hoshino")){
			len=strlen(retu);
			for(int f2=0;f2<7;f2++){
				*rp=s[f2];
				*(rp++);
			}
		}
		printf("%s\n",retu);
	}
	getchar();
	return 0;
}

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

int main(void)
{
	int n, i;
	char a[1000][1000] = {0};
	char *p;

	scanf("%d\n", &n);
	
	for (i = 0; i < n; i++)
		gets(a[i]);

	for (i = 0; i < n; i++)
	{
		p = strstr(a[i], "Hoshino");
		if (p != NULL)
			p[6] = 'a';
	}

	for (i = 0; i < n; i++)
		puts(a[i]);

	return 0;
}

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

int main(){
  int n;
  string key="Hoshino";
  cin>>n;cin.ignore();
  for(int i=0;i<n;i++){
    string str;
    int j=0,k=0;
    getline(cin,str);
    while(str[j]!=0){
      if(key[k]==str[j])k++;
      else k=0;
      if(k==7){
	str[j]='a';
	k=0;
      }
      j++;
    }
    cout<<str<<endl;
  }
  return 0;
}

C++: #include <iostream>

int main(){
    int data_set_num;
    std::cin >> data_set_num;
    std::string word;
    while(std::cin >> word){
        if(word == "Hoshino"){
            word = "Hoshina";
        }
        std::cout << word << " ";
    }
    return 0;
}

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

int main()
{
    string str[1099];
    string s;
    int test,k;
    char ch;

    cin>>test;
    cin.ignore();

    while(test--)
    {
        k=0;
        while(cin>>s)
        {
            if(s==" ")
                continue;

            str[k]=s;
            ch=getchar();
            if(ch=='\n')
                break;
            k++;
        }

        for(int i=0; i<=k; i++)
        {
            if(str[i]=="Hoshino")
                str[i]="Hoshina";
        }

        for(int i=0;i<=k;i++)
            cout<<str[i]<<" ";
        cout<<endl;

       // memset(str,'\0',sizeof(str));
    }
    return 0;
}

C++: #include<stdio.h>
#include<string.h>
 
int main(){
 
  char str[1002],ho[]="Hoshino";
  int n,i;
  char *a;
 
  scanf("%d\n",&n);
  for(i=0;i<n;i++)
    {
      fgets(str,sizeof(str),stdin);
      while((a=strstr(str,ho)) != NULL)
    {
      a[6] = 'a';
    }
      printf("%s",str);
    }
  return 0;
}

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

int main(){
  std::string sent;
  int gyou,num;
  std::cin >> gyou;
  getline(std::cin, sent);
  for(int i=0;i<gyou;i++){
    getline(std::cin, sent);
    std::string bef="Hoshino",aft="Hoshina";
    num=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; 
}