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<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int i,j,n;
    scanf("%d",&n);
    getchar();
    for(i=0;i<n;i++)
    {
        char a[1050]={0};
        //fflush(stdin);
        scanf("%[^\n]",a);
        getchar();
        for(j=0;j<strlen(a);j++)
        {
            if(a[j]=='H'&&a[j+1]=='o'&&a[j+2]=='s'&&a[j+3]=='h'&&a[j+4]=='i'&&a[j+5]=='n'&&a[j+6]=='o')
            {
                a[j+6]='a';
            }
        }
        printf("%s\n",a);
        //for(j = 0; j < 1050; j++)a[j]=0;
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main(){

  int n, idx;
  string s;

  cin >> n;
  cin.ignore();

  while(n--){

    getline(cin, s);

    while((idx = s.find("Hoshino", 0)) != string::npos){

      s[idx + 6] = 'a';

    }

    cout << s << endl;

  }

}

C++: /*****include*****/
#include <iostream>
#include <fstream>
#include <string>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return 0;
	}
#endif
	/*****変数置き場*****/
	string words;
	int n;
	int index;
	/*****処理部*****/
	cin >> n;
	for(int i=0;i<n;i++){
		do{
			getline(cin,words);
		}while(words == "");
		//cin >> words;
		int j;
		j=0;
		while(1){
			index = words.find("Hoshino",j);
			if(index == string::npos){
				//cout << j << endl;
				break;
			}
			words.replace(index,7,"Hoshina");
			j += 6;
			//cout << words << endl;
		}
		cout << words << endl;
	}
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

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

int main(){
    std::string buf;
    int n;

    std::cin >> n;
    // now, there is "\n ...." in the stream.
    // then, skip the initial '\n'.
    std::getline(std::cin,buf);

    for (int i=0;i < n;++i) {
        std::getline(std::cin,buf);
        size_t pos = 0; // index where we will start searching.

        while (true) {
            pos = buf.find("Hoshino",pos);
            if (pos == std::string::npos) {    // couldn't find.
                break;
            }else{
                buf.replace(pos,7,"Hoshina");
                pos += 7;
            }
        }
        std::cout << buf << std::endl;
    }

    return 0;
}

C++: #include<iostream>
#include<string>
int main(){
	int a;
	std::cin>>a;
	for(int i=0;i<a+1;i++){
		std::string str;
		std::getline(std::cin,str);
		for(int j=0;j<str.size();j++){
			if(str[j]=='H'&&str[j+1]=='o'&&str[j+2]=='s'&&str[j+3]=='h'&&str[j+4]=='i'&&str[j+5]=='n'&&str[j+6]=='o'){
				str[j+6]='a';
			}
		}
		std::cout<<str<<std::endl;
	}
	return 0;
}

C++: using System;
class Example
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        for (int a = 0; a < n; a++)
        {
            string[] input = Console.ReadLine().Split(' ');
            if (string.IsNullOrEmpty(input[0]))
                break;
            for (int i = 0; i < input.Length - 1; i++)
            {
                if (input[i] == "Hoshino")
                    input[i] = "Hoshina";
                Console.Write(input[i] + " ");
            }
            Console.WriteLine(input[input.Length - 1]);

        }
    }
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

int main()
{
	int n;
	cin >> n;
	rep(i, n)
	{
		string str;
		cin.sync();
		getline(cin, str);

		rep(j, str.size() - 6)
			if(str.substr(j, 7) == "Hoshino")
				str[j + 6] = 'a';

		cout << str << endl;
	}
}

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

int main(){
	string str;
	int n;
	cin >> n;
	getline(cin, str);
	for (int i = 0; i < n; i++) {
		getline(cin, str);
		for (int j = 0; j < int(str.size()) - 6; j++) {
			if (str.substr(j, 7) == "Hoshino")str.replace(j, 7, "Hoshina");
		}
		cout << str << endl;
	}
}

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

typedef unsigned int uint;

int main() {
	int n; string s; uint idx;
	cin >> n; cin.ignore();
	while(n--) {
		getline(cin, s);
		idx = -1;
		while((idx=s.find("Hoshino"))!=string::npos) s.replace(idx, 7, "Hoshina");
		cout << s << endl;
	}
	return 0;
}

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

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

int main() {
    int n;
    scanf("%d ", &n);
    for (int i = 0; i < n; i++) {
        string input;
        getline(cin, input);
        while (input.find("Hoshino") != string::npos) {
            input.replace(input.find("Hoshino"), 7, "Hoshina");
        }
        cout << input << endl;
    }
}

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

using namespace std;

int main()
{
	int n;
	string str;

	cin >> n;

	for(int i = 0; i < n; i++)
	{
		cin >> str;

		if(str == "Hoshino")
			str = "Hoshina";

		cout << str << endl;

	}
}

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

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

int main(){
	int n;
	cin >> n;
	string s;
	getline(cin,s);
	while(n--){
		vector<int> b;
		getline(cin,s);
		int pos = 0;
		while(~s.find("Hoshino",pos)){
			pos = s.find("Hoshino",pos)+1;
			b.push_back(pos-1);
		}
		for(int i=0;i<b.size();i++)
			s.replace(b[i],7,"Hoshina");
		cout << s << endl;
	}
}

C++: #include<stdio.h>
int main(){
  int n,i,j;
  char s[1003];
  scanf("%d\n",&n);
  for(i=0;i<n;i++){
    fgets(s,1002,stdin);
    for(j=0;s[j]!=0;j++){
      if(s[j++]=='H'){
	if(s[j++]=='o'){
	if(s[j++]=='s'){
	if(s[j++]=='h'){
	if(s[j++]=='i'){
	if(s[j++]=='n'){
	if(s[j++]=='o'){
	if(!('a'<=s[j]&&s[j]<='z')){
        if(!('A'<=s[j]&&s[j]<='Z')){
	  s[j-1]='a';
	}
	}}}}}}}}
    }
    printf("%s",s);
  }
  return 0;
}

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

using namespace std;

int main()
{
	int n;
	string str;
	
	cin >> n;
	cin.ignore();
	while (n > 0){
		getline(cin, str);
		int len = 1;
		while (1){
			len = str.find("Hoshino", len - 1);
			if (len == -1)  break;
			str[len + 6] = 'a';
		}
		cout << str << endl;
		n--;
	}
	return (0);
}