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 <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <string>
#include <bitset>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <sstream>
#include <fstream>
#include <string.h>

#define X first
#define Y second
#define MP make_pair
typedef long long ll;
using namespace std;
const int MAX = 101;

template<class T, class U>
void convert(T &t, U &u){
	stringstream ss;
	ss << t;
	ss >> u;
}

int main(){
	int n;
	cin >> n;
	cin.ignore();
	while(n--){
		string s;
		getline(cin, s);
		while(1){
			int res = s.find("Hoshino", 0);
			if(res == -1) break;
			s.replace(res, 7, "Hoshina");
		}
		cout << s << endl;
	}
	return 0;
}

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

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

	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int n;
  cin>>n;
  cin.ignore();
  rep(j,n){
    string s;
    getline(cin,s);
    int n;
    while(n=s.find("Hoshino"),n!=string::npos)s[n+6]='a';
    //rep(i,s.size()-6)if(s.substr(i,7)=="Hoshino")s.replace(i,7,"Hoshina");
    cout<<s<<endl;
  }


}

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


int n;
std::string str;
std::string strs[1000];


void solve();
void split();


void solve() {
	split();

	for (auto& var : strs) {
		if (var == "Hoshino") {
			var = "Hoshina";
		}

		std::cout << var;
	}

	std::cout << std::endl;

}

void split() {
	int i = 0, cnt = 0;
	std::string hoge;

	while (i < str.size()) {
		if (str[i] == ' ' || str[i] == ',' || str[i] == '.') {
			strs[cnt++] = hoge;
			hoge = "";
		}
		else {
			hoge += str[i];
		}

		i++;
	}

	strs[cnt] = hoge;
}


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

	for (;  n >= 0; n--) {
		std::getline(std::cin, str);

		solve();
	}

	return 0;
}

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

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

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

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

int main(void){
	std::string str;

	while(std::cin >> str){
		std::string::size_type index;

		for(index = str.find("Hoshino"); index != std::string::npos; index = str.find("Hoshino",index + 6)){
			str.replace(index,7,"Hoshina");
		}

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

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

using namespace std;

string s;

signed main()
{
    int n = 0;
    scanf( "%d\n", &n );
    while( 0 < n )
    {
        getline( cin, s );
        s = replace( s, "Hoshino", "Hoshina" );
        cout << s << endl;
        n--;
    }
    return 0;
}

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

using namespace std;

int main(){
  int num;
  char c;
  cin >> num;
  scanf("%c",&c);
  for(int i = 0; i < num; i++){
    string str;
    while(1){
      scanf("%c",&c);
      if(c == '\n'){
	if(str != "Hoshino")cout << str << endl;
	else cout << "Hoshina" <<  endl;
	break;
      }
      if(c == ' '){
	if(str != "Hoshino")cout << str << " ";
	else cout << "Hoshina ";
	str = "";
	continue;
      }
      if(!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')){
	if(str != "Hoshino")cout << str << c;
	else cout << "Hoshina" << c;
	str = "";
	continue;
      }
      str += c;
    }

  }
  return 0;
}

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

int main()
{
	int g,i;
	string ob;
	
	cin >> i;
	cin.get( );
	
	for(g=0;g<i;g++){
		string::size_type pos;
		
		getline(cin, ob);
		while(pos=ob.find("Hoshino"), pos!=string::npos)ob.replace(pos, 7, "Hoshina");
		
		cout << ob << endl;
	}
	
	return 0;
}

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

int main(){

    int data_set_num;
    std::string str;
    std::string from = "Hoshino";
    std::string to = "Hoshina";
    std::cin >> data_set_num;
    std::cin.ignore();

    while(data_set_num--){
        std::getline(std::cin,str);
        std::string::u_int pos = str.find(from);
        while(pos != std::string::npos){
            str.replace(pos, from.size(), to);
            pos = str.find(from, pos + to.size());
        }
        std::cout << str << std::endl;
    }

    return 0;
}

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

int main(){
    int n;
    std::string str;
    std::string fr = "Hoshino";
    std::string to = "Hoshina";
    std::string::size_type pos;
    std::cin >> n;
    std::cin.get();
    
  
        //文字列の読み込み
    while(n > 0 && std::getline(std::cin, str)){
        //"Hoshino"を"Hoshina"に変換
        pos = str.find(fr);
        while(pos != std::string::npos){
            str.replace(pos, fr.size(), to);
            pos = str.find(fr, pos+to.size());
        }
        //表示
        std::cout << str << std::endl;
        str = "";
        std::cin.clear();
        --n;
    }
}

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

string replaceAll(string str, string pattern, string replacement) {
  string::size_type pos = str.find(pattern);
  while (pos != string::npos) {
    str.replace(pos, pattern.size(), replacement);
    pos = str.find(pattern, pos + pattern.size());
  }
  return str;
}

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