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 <sstream>
#include <vector>
 
int main(void){
    int n; //number of data set
 
    std::cin >> n; //input number of data set
    std::cin.ignore(); //delete cin buffer
 
    for(size_t i = 0; i < n; ++i){
        std::vector<std::string> str; //string data
        std::string line; //outputted line data 
         
        std::string buf;
        std::string tmp;
 
        std::getline(std::cin, buf); //input line data
        std::istringstream is(buf);
 
        while(is >> tmp){ //input word
            while(tmp.find("Hoshino") != -1){ //judge word
                tmp.replace(tmp.find("Hoshino"), 7, "Hoshina");
            }
            str.push_back(tmp); //add word to list
        }
 
        //make outputted line data
        for(std::vector<std::string>::iterator it = str.begin(); it != str.end(); it.next()){
            if(it == (str.end() - 1)){
                line = line + *it;
            }else{
                line = line + *it + " ";
            }
        }
 
        //output line data
        std::cout << line << std::endl;
    }
 
    return 0;
}

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

int main(void)
{
	int N;
	
	while(scanf("%d", &N) != EOF){
		fflush(stdin);
		while(--N, N>=0){
			char instr[1001];
			char *t;
	
			gets(instr);
			while( (t = strstr(instr, "Hoshino")) != NULL){
				t += 6;
				*t = 'a';
			}
	
			printf("%s\n", instr);
		}

	}
	

	return 0;
}

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

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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <algorithm>
#include <string>
#include <sstream>
 
#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif

int main(int argc, char **argv){
	int n;
	std::string buf;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	ifs >> n;
#else
	std::cin >> n;
#endif


#if INPUT_FROM_FILE
	std::getline(ifs, buf);
#else
	std::getline(std::cin, buf);
#endif
	for(int i = 0; i < n; i++){
#if INPUT_FROM_FILE
		std::getline(ifs, buf);
#else
		std::getline(std::cin, buf);
#endif
		int pos = buf.find("Hoshino");
		while(true){
			pos = buf.find("Hoshino", pos);
			if(pos == std::string::npos){ break; }
			buf[pos + 6] = 'a';
			pos += 6;
		}
		std::cout << buf << std::endl;
	}


#if INPUT_FROM_FILE
	//fclose(fp);
#endif
	return 0;
}

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