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 <stdio.h>
#include <string.h>

int main(void) {
	int i,j;
	int n = 0;
	char strsent[50][1000] = { 0 };
	char work[1000] = { 0 };
	scanf("%d", &n);
	getchar();
	for(i = 0; i < n; i++) {
		// ???????????\???
		gets(strsent[i]);
	}
	for(i = 0; i < n; i++) {
		for(j = 0; strsent[i][j] != '\0'; j++){
			// null?????§??????
			if(	strsent[i][j+1] == '\0' ||
				strsent[i][j+2] == '\0' ||
				strsent[i][j+3] == '\0' ||
				strsent[i][j+4] == '\0' ||
				strsent[i][j+5] == '\0' ||
				strsent[i][j+6] == '\0' ) {
				// ???????????????????????°?????????????????§??????
				break;
			}
			if(	strsent[i][j]   == 'H' &&
				strsent[i][j+1] == 'o' &&
				strsent[i][j+2] == 's' &&
				strsent[i][j+3] == 'h' &&
				strsent[i][j+4] == 'i' &&
				strsent[i][j+5] == 'n' &&
				strsent[i][j+6] == 'o' ) {
				// Hoshino?????´??????Hoshina????¨???£
				strsent[i][j+6] = 'a';
			}
		}
		printf("%s\n", strsent[i]);
	}
	return 0;
}

C++: #include <stdio.h>
#include<math.h>
#include <algorithm>
#include <queue>

using namespace std;

int main(){
	int n;
	char buf[1100];

	scanf("%d",&n);
	getchar();

	for(int i=0; i < n; i++){
		fgets(buf,1100,stdin);

		for(int k=0; buf[k] != '\n' && buf[k] != '\n'; k++){
			if(k >= 6 && buf[k] == 'o' && buf[k-1] == 'n' && buf[k-2] == 'i'&&
					buf[k-3] == 'h' && buf[k-4] == 's' && buf[k-5] == 'o' && buf[k-6] == 'H'){
				buf[k] = 'a';
			}
		}

		printf("%s",buf);
		buf[0] = '\0';
	}


    return 0;
}

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

using namespace std;

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

	cin >> n;
	cin.ignore();

	for (int i = 0; i < n; ++i){
		int x = 0;
		getline(cin, a);
		if ((x = a.find("Hoshino")) >= 0)
			a.replace(x, strlen("Hoshino"), "Hoshina");
		cout << a << endl;
	}
	
	return 0;
}

C++: #include <iomanip>
#include <utility>
#include <vector>
#include <math.h>
#include <algorithm>
#include <string>
#include <iostream>
using namespace std;

int main()
{
	string n;
	getline(cin, n);
	string s;
	while (getline(cin, s))
	{
		for (int i = 0; i < s.size() - 6; i++)
		{
			if (s[i] == 'H' && s[i+1] == 'o' && s[i+2] == 's' && s[i+3] == 'h' && s[i+4] == 'i' && s[i+5] == 'n' && s[i+6] == 'o')
			{
				s[i + 6] = 'a';
			}
		}
		cout << s << endl;
	}

	return 0;
}

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

static const std::string MISS_STR = "Hoshino";

int main(void) {
    int n;
    std::cin >> n;
    getchar();

    while (0 < n--) {
        std::string str;
        std::getline(std::cin, str);

        const unsigned int str_size = str.size();
        unsigned int cur = 0;
        std::string::size_type pos = str.find(MISS_STR, 0);

        while (pos != std::string::npos && cur <= str_size) {
            str[pos + 6] = 'a';

            // increase cursor
            cur += (pos + MISS_STR.size());
            pos = str.find(MISS_STR, cur);
        }

        std::cout << str << std::endl;
    }

    return 0;
}

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

string t = "Hoshino";

int main(void) {
  int n;
  string str;
  
  cin >> n;
  cin.ignore();
  for(int j=0; j<n; j++) {
    getline(cin, str);
    for(int i=0; i<str.length()-6; i++) {
      if(str.substr(i, 7) == t) { str[i+6] = 'a'; i+=7; }
    }
    cout << str << endl;
  }
  
  return 0;
}

C++: #include <iostream>

using namespace std;

void replaceAll(string &str,const string from,const string to){
  string::size_type pos = 0;
  while((pos=str.find(from))!= string::npos)
    {
      str.replace(pos,from.size(),to);
    }
}
int main(){
  int n;
  cin >> n;
  string line;
  getline(cin , line);
  while(n--){
    getline(cin, line);
    replaceAll(line, "Hoshino","Hoshina");
    cout << line << endl;
  }
  return 0;
}

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

int main(){
	int n;
	string str;
	
	cin >> n;
	cin.ignore();
	while(getline(cin,str)){
		int pos;
		while( (pos=str.find("Hoshino",0)) != string::npos ){
			str.erase(pos,7);
			str.insert(pos,"Hoshina");
		}
		
		cout << str << endl;
	}
}

C++: #include<iostream>
#include<string>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(){
	string s;
	int n;
	cin>>n;
	cin.ignore();
	rep(i,n){
		getline(cin,s);
		int size=s.size();
		rep(j,size-6){
			string point=s.substr(j,7);
			if(point=="Hoshino"){
				point="Hoshina";
				s.replace(j,7,point);
			}
		}
		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>
char a[1050]={0};
int main()
{
    int i,j,k,n;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        fflush(stdin);
        scanf("%[^\n]",a);
        fflush(stdin);
        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;
        fflush(stdin);
        
    }
    return 0;
}

C++: 
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
#include<cstdio>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()


int main(void){
	string num;
	getline(cin,num);
	int n = atoi(&num[0]);
	while(n--){
		string s;
		getline(cin,s);
		rep(i,s.size()){
			if(s[i]=='H'&&s[i+1]=='o'&&s[i+2]=='s'&&s[i+3]=='h'&&s[i+4]=='i'&&s[i+5]=='n'&&s[i+6]=='o'){
				s[i+6]='a';
			}
			if(s[i]=='\n'){cout<<endl;n--;break;cout<<"test"<<n<<endl;}
			}
		cout<<s<<endl;
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007
#define EPS 1e-10

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;
typedef pair<P, char> PC;

int n;
string s;

int main(){
	cin >> n;
	cin.ignore();
	while(n--){
		getline(cin, s);
		bool f = 0;
		for (int i = 0; i < s.size() - 6; i++){
			string t = s.substr(i, 7);
			if (t == "Hoshino"){
				s[i + 6] = 'a';
			}
		}
		cout << s << endl;
	}
}

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

int main()
{
  int n;
  cin >> n;

  while (n--){
    string str;
    getline(cin, str);
    for (int i = 0; i <= str.size(); i++){
      if (str.substr(i, 7) == "Hoshino") str[i + 6] = 'a';
      cout << str[i];
    }
    cout << endl;
  }

  return (0);
}