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++: //Name: Aizu PR
//Level: 1
//Category: 文字列,String,やるだけ
//Note:

#include <iostream>
#include <string>

using namespace std;

bool solve() {
    int N;
    if(!(cin >> N)) return false;
    cin.ignore();
    for(int i = 0; i < N; ++i) {
        string str;
        getline(cin, str);
        while(true) {
            size_t pos = str.find("Hoshino");
            if(pos == string::npos) break;
            str = str.substr(0, pos) + "Hoshina" + str.substr(pos + 7);
        }
        cout << str << endl;
    }
    return true;
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(0);

    while(solve()) ;
    return 0;
}

C++: #define scanf_s scanf
#define sscanf_s sscanf
#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 1001
#define HO 6
int main(void)
{
	int n;
	char str[MAX], no[] = { "Hoshino" }, na[] = { "Hoshina" };
	gets_s(str);
	sscanf_s(str, "%d", &n);
	for (int i = 0; i < n; ++i) {
		gets_s(str);
		for (int j = 0; str[j] != '\0'; ++j) {
			if (no[HO] == str[j] && j >= HO) {
				for (int k = 0; k <= HO; ++k) {
					if (str[j - k] != no[HO - k]) break;
					else if (k == HO) {
						str[j] = na[HO];
					}
				}
			}
			printf("%c", str[j]);
		}
		printf("\n");
	}
}

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

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

C++: #include<iostream>
#include<cstring>
#include<string>
using namespace std;
int main(){
	int n;
	string s;
	cin>>n;cin.get();
	while(n-->0){
		getline(cin,s);
		for(int i=0;i<s.size();i++){
			if(s.substr(i,7)=="Hoshino")
				s[i+6]='a';
		}
		cout<<s<<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;
    }
    return 0;
}

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