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<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

using namespace std;

int main(){
	int n=0;
	string str;
	cin >> n;
	getline(cin,str);
	for(int i=0;i<n;i++){
		getline(cin,str);
		if(str.find("Hoshino") != string::npos){
			str.replace(str.find("Hoshino"),7,"Hoshina");
		}
		cout << str << endl;
	}
	return 0;
}
/*
	bug.
	int n=0;
	string str;
	cin >> n;
	for(int i=0;i<=n;i++){
		getline(cin,str);
		if(str.find("Hoshino") != string::npos){
			str.replace(str.find("Hoshino"),7,"Hoshina");
		}
		cout << str << endl;
	}
	return 0;
	
	}
*/

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
using namespace std;

int main() {
	int n;
	cin >> n;
	string sub;
	getchar();
	for (int i = 0; i < n; ++i) {
		string s;
		getline(cin, s);
		for (int j = 0; j < s.size(); ++j) {
			if (s.size() < 7) {
				break;
			}
			sub = s.substr(j, 7);
			if (sub == "Hoshino") {
				s.replace(j, 7, "Hoshina");
			}
		}
		cout << s << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;int main(){char ch;int n;cin>>n;cin.get(ch);for(int i=0;i<n;i++){string str;while(1){cin.get(ch);if(ch=='\n')break;str+=ch;}while(1){int idx=str.find("Hoshino");if(idx==-1)break;str[idx+6]='a';}cout<<str<<endl;}return 0;}

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

int main(void) {

  int n;
  char word[200];

  char buf[200];

  char* p;
  char c;
  int i;
  
  scanf("%d",&n);
  c=getchar();

  for(i=0;i<n;i++) {

    fgets(buf,sizeof(buf),stdin);

    buf[strlen(buf)-1]='\0';

    word[0]='\0';

    p=strtok(buf," ");
    if(strcmp(p,"Hoshino")==0) {
      strcat(word,"Hoshina ");
    }
    else {
      strcat(word,p);
      strcat(word," ");
    }

    while((p=strtok(NULL," "))!=NULL) {
      if(strcmp(p,"Hoshino")==0) {
	strcat(word,"Hoshina ");
      }
      else {
	strcat(word,p);
	strcat(word," ");
      }
    }

    printf("%s\n",word);

  }

  return 0;

}

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

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

int main(){
	int n,j;
	int flg;
	char c,l;
	
	cin>>n;c=getchar();
	for(j=0;j<n;j++){
	 flg=0;l=0;
	 while(1){
	  c=getchar();
	  if(c=='\n'){
	   if(l!=0){break;}else{continue;}
	  }else{
	   switch(flg){
		case 0:
		if(c=='H'){flg++;}
		break;
		case 1:
		if(c=='o'){flg++;}else{flg=0;}
		break;
		case 2:
		if(c=='s'){flg++;}else{flg=0;}
		break;
		case 3:
		if(c=='h'){flg++;}else{flg=0;}
		break;
		case 4:
		if(c=='i'){flg++;}else{flg=0;}
		break;
		case 5:
		if(c=='n'){flg++;}else{flg=0;}
		break;
		case 6:
		if(c=='o'){c='a';}
		flg=0;
		break;
	   }
	   cout<<c;
	   l++;
	  }
	 }
	 cout<<endl;
	}
	return 0;
}

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

int main(void)
{
	int N;
	char c;

	scanf("%d", &N);
	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>

using namespace std;

int main(void){
    string str;
    string judge_b;
    string judge_a;
    int i;
    int n;
    int judge;
    
    cin>>n;
    cin.get();
    for(i=0;i<n;i++){
        getline(cin,str);
        while(judge=str.find("Hoshino"),judge!=string::npos){
            str.replace(judge,7,"Hoshina");
        }
        cout<<str<<endl;
    }
    return(0);
}

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

int main(void){
	std::string tmp;
	u_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 buf;
		std::string line; //outputted line data 

		std::getline(std::cin, buf); //input line
		std::istringstream is(buf);

		while(is >> tmp){ //input word
			if(tmp == "Hoshino"){ //judge word
				tmp = "Hoshina";
			}
			str.push_back(tmp); //add word to list
		}

		//output line
		for(std::vector<std::string>::iterator it = str.begin(); it != str.end(); ++it){
        	if(it == (str.end() - 1)){
           		line = line + *it + "\0" ;
        	}else{
        		line = line + *it + " ";
        	}
        }
        std::cout << line << std::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') {
			}
			else{
				cout << judge;
				judge = "";
			}
			if (judge == "Hoshino") {
				cout << "Hoshina";
				judge = "";
			}
			else if (j == str.size() - 1) {
				cout << judge;
				judge = "";
			}
		}
		cout << endl;
	}
	return 0;
}

C++: //#include <bits/c++.h>
#include <iostream>
#include <cstdio>
#include <stdio.h>
#define rep(i,n) for(int i = 0; i< n; i++)
#define MAX_SIZE 1010

using namespace std;

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 <cstring>
#include <cstdlib>

using namespace std;

string convert(string str) {
    int idx = 0;
    for (;;) {
        idx = str.find("Hoshino", idx);
        if (idx == string::npos) break;
        str.replace(idx, 7, "Hoshina");
        idx += 7;
    }
    return str;
}

int main() {
    int n;
    string str;
    getline(cin, str);
    n = atoi(str.c_str());
    for (int i = 0; i < n; i++) {
        getline(cin, str);
        cout << convert(str) << endl;
    }
    return 0;
}

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

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