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)) {
    stringstream ss;
    ss << s;
    string t;
    vs z;
    while (ss >> t) {
      if (t == "Hoshino") t  = "Hoshina";
      if (t == "Hoshino.") t = "Hoshina.";
      z.pb(t);
    }
    if (z.size()) cout << z[0];
    loop(i, 1, z.size()) cout << ' ' << z[i];
    cout << endl;
  }
}

C++: #include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

string &replaceAll(string &s, const string &from, const string &to) {
  int pos = 0;
  size_t find_pos;
  while ((find_pos = s.find(from, pos)) != string::npos) {
    s.replace(find_pos, from.size(), to);
    pos = find_pos + to.size();
  }
  return s;
}

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int n;
  cin >> n;
  cin.ignore();
  for (int i = 0; i < n; i++) {
    string s;
    getline(cin, s);
    cout << replaceAll(s, "Hoshino", "Hoshina") << endl;
  }

  return 0;
}

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

using namespace std;

// string型にfindとrepraceがある。
// これを用いて、

const string mis("Hoshino"), rep("Hoshina");

int main() {

	int N;
	cin >> N;
	cin.ignore();

	for (int i = 0; i < N; ++i) {
		string line;
		getline(cin, line);
		int pos = 0;
		while ((pos = line.find(mis, pos)) != string::npos) {
			line.replace(pos, mis.size(), rep);
		}
		cout << line << endl;
	}


	return 0;
}

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

int main(){
  int n,i,j,head,end;
  string s;

  cin >> n;

  for(int k=0;k<=n;k++){

    getline(cin,s);
    
    
    for(i=0;i<s.length();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]='H';
	s[i+1]='o';
	s[i+2]='s';
	s[i+3]='h';
	s[i+4]='i';
	s[i+5]='n';
	s[i+6]='a';
      }
    }
    if(k !=0)cout << s << endl;
   
    
  }
  



}

C++: #include <iostream>
#include <sstream>
#include <vector>

int main(void){
	int n; //number of data set

	std::cin >> n; //input number of data set
	std::cin.ignore(); //delete cin buffer

	for(size_t i = 0; i < n; ++i){
		std::vector<std::string> str; //string data
		std::string line; //outputted line data 
		
		std::string buf;
		std::string tmp;

		std::getline(std::cin, buf); //input line data
		std::istringstream is(buf);

		while(is >> tmp){ //input word
			if(tmp.find("Hoshino") != -1){ //judge word
				tmp.replace(tmp.find("Hoshino"), 7, "Hoshina");
			}
			str.push_back(tmp); //add word to list
		}

		//make outputted line data
		for(std::vector<std::string>::iterator it = str.begin(); it != str.end(); ++it){
        	if(it == (str.end() - 1)){
           		line = line + *it;
        	}else{
        		line = line + *it + " ";
        	}
        }

        //output line data
        std::cout << line << std::endl;
	}

	return 0;
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string.h>
#include<math.h>
#include<cstring>
using namespace std;
char text[1001];
int main(){
	int i,ii,j,n,a;
	cin>>n;
	
			for(i=0;i<n;i++){
			while(gets(text)){a=strlen(text);
			for(j=0;j<a-6;j++){
				if(text[j]=='H'&&text[j+1]=='o'&&text[j+2]=='s'&&text[j+3]=='h'&&text[j+4]=='i'&&text[j+5]=='n'&&text[j+6]=='o'){
					text[j+6]='a';j+=6;
				}
			}
			cout<<text<<endl;
		}
	}
    return 0;
}

C++: #include <iostream>
#include <sstream>
#include <vector>
 
int main(void){
    int n; //number of data set
 
    std::cin >> n; //input number of data set
    std::cin.ignore(); //delete cin buffer
 
    for(size_t i = 0; i < n; ++i){
        std::vector<std::string> str; //string data
        std::string line; //outputted line data 
         
        std::string buf;
        std::string tmp;
 
        std::getline(std::cin, buf); //input line data
        std::istringstream is(buf);
 
        while(is >> tmp){ //input word
            while(tmp.find("Hoshino") != -1){ //judge word
                tmp.replace(tmp.find("Hoshino"), 7, "Hoshina");
            }
            str.push_back(tmp); //add word to list
        }
 
        //make outputted line data
        for(std::vector<std::string>::iterator it = str.begin(); it != str.end(); ++it){
            if(it == (str.end() - 1)){
                line = line + *it;
            }else{
                line = line + *it + " ";
            }
        }
 
        //output line data
        std::cout << line << std::endl;
    }
 
    return 0;
}

C++: #include<iostream>
#include<cstring>
using namespace std;
int main(){
	int n;
	char s[1050],ha[]="Hoshina",ho[]="Hoshino";
	cin>>n;
	while(n-->0){
		fgets(s,1050,stdin);
		for(int i=0;i<strlen(s);i++){
			if(!strncmp(&s[i],ho,7)){
				strncpy(&s[i],ha,7);
			}
		}
		cout<<s;
	}
	return 0;
}

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

int main(){
	int num;
	std::string english;
	std::cin >> num;
	for(int i=0;i<=num;++i){
		std::getline(std::cin,english);
		
		while(english.find("Hoshino") != -1){
			size_t find = english.find("Hoshino");
			english.replace(find, find+7, "Hoshina");
		}

		std::cout << english << std::endl;
	}
    return 0;
}

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

using namespace std;

int main(void) {
	int D_Set;
	
	cin >> D_Set;
	
	for(int i = 0; i < D_Set; i++) {
		string text;
		
		getline(cin, text);
		
		while(1) {
			string::size_type pos = text.find("Hoshino");
			if(pos == string::npos)	{ break; }
			else {
				text[pos + 6] = 'a';
			}
		}
		cout << text << endl;
	}
	return 0;
}

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

int main(){
  std::string sent;
  int gyou,num=0;
  std::cin >> gyou;
  getline(std::cin, sent);
  for(int i=0;i<gyou;++i){
    num=0;
    getline(std::cin, sent);
    std::string bef="Hoshino",aft="Hoshina";
    while(num!=-1){
      num=(int)(sent.find(bef));
      if(num!=-1){
      sent.replace(num,bef.size(),aft);
      }
    }
    std::cout << sent << std::endl;
    /*if(i<gyou-1)
    std::cout << std::endl;*/
  }
  return 0; 
}