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<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,b,n) for(int i=b;i<n;i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int n;
string str;
int main(){
	cin>>n;
	string h  ="Hoshina";
	for(int i = 0;i < n;i++){
		getline(cin,str);
		while(str.find("Hoshino")!=string::npos){
			str.replace(str.find("Hoshino"),h.length(),h);
		}
		cout <<str<<endl;
	}
	return 0;
}

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

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

}

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

int main(void)
{
	int N;
	
	while(scanf("%d", &N), 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>
int main(){
  std::string s;
  int n;
  std::cin>>n,std::cin.get();
  for(;n;n--){
    getline(std::cin,s);
    int pos=0;
    while(pos=s.find("Hoshino",pos),pos!=std::string::npos){
      s.replace(pos,7,"Hoshina");
      pos+=7;
    }
    std::cout<<s<<std::endl;
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <queue>
#include <stack>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cmath>
#include <complex>
#include <map>
#include <climits>
#include <sstream>
using namespace std;

#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second
#define mkp make_pair

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vint;
static const int INF=1<<24;

template <class T>
void initvv(vector<vector<T> > &v,int a,int b, const T  &t = T()){
	v.assign(a,vector<T>(b,t));
}

int main(){
	int n;
	cin>>n;
	string t;
	getline(cin,t);
	rep(i,n){
		string s;
		getline(cin,s);
		// cout<<s.size()<<endl;
		rep(j,s.size()-6){
			if(s.substr(j,7)=="Hoshino"){
				// cout<<"hoge"<<endl;
				//cout<<s[j+6]<<endl;
				s[j+6]='a';
			}
		}
		cout<<s<<endl;
	}
	return 0;
}

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

int main() {
  int n;
  cin >> n;
  cin.ignore();
  while(n--) {
    string s, t, u;
    getline(cin, s);
    t = "Hoshino";
    u = "Hoshina";
    for(int i = 0; i < s.size(); ++i) {
      if(s.substr(i, t.size()) == t) {
        cout << u;
        i += t.size() - 1;
      } else {
        cout << s[i];
      }
    }
    cout << endl;
  }
  return 0;
}

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

int n;
string s;

bool match(int index, string pattern) {
	if (index + pattern.size() > s.size()) return false;
	for (int i = 0; i < pattern.size(); i++) {
		if (s[index + i] != pattern[i])
			return false;
	}
	return true;
}

int change() {
	string after = "Hoshina", before = "Hoshino";
	for (int i = 0; i < s.size(); i++) {
		if (match(i, before)) {
			for (int j = 0; j < before.size(); j++) {
				s[i + j] = after[j];
			}
		}
	}
	return 0;
}

int main(){
	cin >> n;
	cin.ignore();
	for (int i = 0; i < n; i++) {
		getline(cin, s);
		change();
		cout << s << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
 
int main(){
    int n,s;
    string str;
    cin >> n;
    getline(cin,str);
    for(int i=0;i<n;i++){
        getline(cin,str);
        s=str.size();
        for(int i=0;i<s;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';
            }
        }
        cout << str << endl;
    }
    return 0;
}

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

int main(){
	string x;
	int pos;
	int n;
	cin >> n;
		x = "";
		cin.ignore();
		while (n--){
			cin >> x;
		while ((pos=x.find("Hoshino"))!= string::npos){
			x.replace(pos, 7, "Hoshina");
		}
		cout << x << endl;

	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>

using namespace std;

#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": # "<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;

int main()
{
	int n;
	cin>>n;
	cin.get();
	for(int i=0;i<n;i++){
		string s;
		getline(cin,s);
		for(size_t j=s.find("Hoshino",0);j!=string::npos;j=s.find("Hoshino",j))
			s[j+6]='a';
		cout<<s<<endl;
	}
	
	return 0;
}

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

int main()
{
    const std::string str_false = "Hoshino";
    const std::string str_true = "Hoshina";

    u_int num_of_data;
    std::string text;
    std::cin >> num_of_data;
    std::cin.ignore();
    
    for(u_int i = 0; i < num_of_data; ++i){
        getline(std::cin, text);
        u_int index = 0;
        
        while((index = text.find(str_false, index)) != std::string::npos)
            text.replace(index, str_false.size(), str_true);
        std::cout  << text << std::endl;
    }
    
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int i,l,j,n;
    string a;
    scanf("%d",&n);
    getchar();
    for(i=1;i<=n;i++)
    {
        getline(cin,a);
        l=a.size();
        for(j=0;j<l-6;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';
        }
       cout<<a<<endl;
    }
    return 0;
}

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

using namespace std;

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