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++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  string s;
  while (getline(cin, s)) {
    s = regex_replace(s, regex("Hoshino"), "Hoshina");
    cout << s << endl;
  }
}

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

using namespace std;

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

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

int main() {
  int n;
  cin >> n;
  cin.ignore();
  while( n-- ) {
    string s;
    int pos;
    getline(cin, s);
    pos = s.find("Hoshino");
    while( pos != -1 ) {
      s[pos+6] = 'a';
      pos = s.find("Hoshino");
    }

    cout << s << endl;
  }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    string str,Hoshino="Hoshino";
    cin>>n;
    cin.ignore();
    for(int i=0;i<n;i++){
        getline(cin,str);
        for(int j=0;str[j]!='\0';j++){
            if(str[j]=='H'){
                for(int k=j;k<7+j;k++){
                    if(str[k]!=Hoshino[k-j])break;
                    if(k==j+6)str[k]='a';
                }
            }
        }
        cout<<str<<endl;
    }
}

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++: #include <iostream>
#include <array>
#include <string>

int main(){
  int n;
  int i = 0;
  int flag = 0;
    std::array<std::string, 1000> str = {};

  std::cin >> n;

  while(n > 0){
    while(std::cin >> str[i]){
      ++flag;
        ++i;
    }
      for(int j = 0;j < flag;++j){
          if(str[j] == "Hoshino")
              str[j] = "Hoshina";
      }
      for(int j = 0;j < i;++j){
          std::cout << str[j];
      }
      std::cout << endl;
      
      flag = 0;
      i = 0;
      --n;
  }
}

C++: #include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    int i,j,n;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        char a[1050]={0};
        fflush(stdin);
        scanf("%[^\n]",a);
        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 <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);
    }

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

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

  }

  return 0;

}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
using namespace std;
#define INF	100000000
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define lb lower_bound
#define ub upper_bound
#define SS stringstream
#define rep(i,n) for(int i = 0; i < n; i++)
#define sz(x) ((int)(x).size())
#define SORT(x) sort((x).begin(), (x).end())
#define RSORT(x) sort((x).begin(), (x).end(), greater<int>() )
#define clr(a,b) memset((a),(b),sizeof(a))
typedef long long int ll;
typedef pair<int, int> P;
typedef vector<int> Vi;
typedef vector<ll> Vll;
typedef vector<P> Vp;
typedef priority_queue<P, vector<P>, greater<P> > PQ;

int n;
string str;

int main(){
	cin >> n;
	cin.ignore();
	rep(i,n){
		getline(cin,str);
		rep(j,str.size()-6){
			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';
			}
		}
		cout << str << 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

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

int n;
string s;

int main(){
	cin >> n;
	cin.ignore();
	REP(i,n){
		getline(cin, s);
		string ans = "";
		stringstream ss;
		string buf;
		bool f = 0;
		ss << s;
		while (ss >> buf){
			if (buf.find("Hoshino") != -1){
				buf[buf.find("Hoshino") + 6] = 'a';
			}
			if (f == 0){
				ans += buf;
				f = 1;
			}
			else{
				ans += ' ' + buf;
			}
		}
		cout << ans << endl;
		ans.clear();
	}
}

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

int main(){

	const std::string correct_word = "Hoshina";
	const std::string find_word = "Hoshino";
	
	int N;

	std::cin >> N;
	std::cin.ignore();

	for(int i = 0; i < N; ++i){
	
		std::string str;
		std::getline(std::cin,str);

		std::string::size_type pos = str.find(find_word);
		
		while(pos != std::string::npos){

			 str.replace(pos, find_word.length(), correct_word);

			 pos = str.find(find_word, pos + find_word.length());
		}
	
		std::cout << str << std::endl;
	
	}
	return 0;
}