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

C++: #include <iostream>
#include <string>
#include <stdlib.h>

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

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

    const int nn = n;

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

        // :(
        if (nn - 1 == n) {
            continue;
        }

        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) {
            // fix miss
            for (unsigned int i = cur; i < pos; i++) {
                std::cout << str.at(i);
            }
            std::cout << CORRECT_STR;

            // increase cursor
            cur += (pos + MISS_STR.size());

            pos = str.find(MISS_STR, cur);
        }

        for (unsigned int i = cur; i < str_size; i++) {
            std::cout << str.at(i);
        }
        std::cout << std::endl;
    }

    return 0;
}

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

//#define int long long
#define DBG 1
#define dump(o) if(DBG){cerr<<#o<<" "<<o<<endl;}
#define dumpc(o) if(DBG){cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define each(it,c) for(auto it=(c).begin();it!=(c).end();it++)
#define all(c) c.begin(),c.end()
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)(1e9 + 7);
const double EPS = 1e-10;

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

C++: #include <string>
#include <iostream>
#include <cstdio>
int main(){
	int n;
	std::cin>>n;
	std::string s;
	std::cin.ignore();
	for(int i=0;i<n;++i){
		std::getline(std::cin,s);
		/*for(int j=0;j<s.size()-6;++j){
			if(s[j]=='H' && s[j+1] == 'o' && s[j+2] == 's'&& s[j+3] == 'h'&& s[j+4] == 'i'&& s[j+5] == 'n'&& s[j+6] == 'a')s[j+6]='a';
		}*/
		while(s.find("Hoshino") != std::string::npos){
			s[s.find("Hoshino")+6]='a';
			//std::cout<<s.find("Hoshino")<<std::endl;
		}
		//std::cout<<"tes"<<std::endl;
		std::cout<<s<<std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
using namespace std;
int main(){
	
	int n;
	string s;
	string d="Hoshina";
	cin>>n;
	while(n--){
		while(getline(cin,s)!="\n")
		while(1){
			unsigned int loc = s.find("Hoshino");
			if(loc!=string::npos)
			s.replace(loc,d.size(),d);
			else
				break;
		}
		cout<<s<<endl;
	}
}

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

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

int main(){
  int n;
  char c,tmp;
  int f;

  cin >> n;
  getchar();

  f = 0;
  while(n){
    c = getchar();

    if(f == 0 && c == 'H')f++;
    else if(f == 1){
      if(c == 'o')f++;
      else f = -1;
    }else if(f == 2){
      if(c == 's')f++;
      else f = -1;
    }else if(f == 3){
      if(c == 'h')f++;
      else f = -1;
    }else if(f == 4){
      if(c == 'i')f++;
      else f = -1;
    }else if(f == 5){
      if(c == 'n')f++;
      else f = -1;
    }else if(f == 6){
      if(c == 'o'){
	tmp = getchar();
	if(tmp == '\n' || tmp == ' ')putchar('a');
	else putchar(c);
	c = tmp;
      }
      f = -1;
    }

    if(c == '\n'){
      n--;
      f = 0;
    }else if(c == ' ')f = 0;

    putchar(c);
  }
}

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

using namespace std;

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

	string rect = "Hoshino";

	for (int t = 0; t < n; ++t) {
		char str[2000];
		while (scanf("%s", str) != EOF) {
			for (int i = 0; str[i]; ++i) {
				for (int j = 0; j < rect.size() && str[i+j]; ++j) {
					if (str[i+j] != rect[j]) break;
					else if (j == rect.size()-1) str[i+j] = 'a';
				}
			}

			cout << str;

			char c = getchar();
			if (c == EOF) break;
			if (c == '\r' || c == '\n') break;

			cout << " ";
		}
		cout << endl;
	}
}

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

std::string false = "Hoshino";
std::string true = "Hoshina";

int main(){
	int num;
	std::string english;
	std::cin >> num;

	for(int i=0;i<num;i++){
		std::cin >> english;
		for(int j=0;j<english.lemgth();j++){
			if(english[j]==false) english[j]=true;
		}
	}

    return 0;
}

C++: import string

n=int(input())

for i in range(n):
    print(input().replace("Hoshino", "Hoshina"))