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 <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n;
    cin >> n;
    cin.ignore();
    for (int _ = 0; _ < 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 << "\n";
    }
    return 0;
}

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

using namespace std;

int main(){
	string text;
	int n,j;
	int i;
	
	cin>>n;
	for(j=0;j<n;j++){
	 cin>>text;
	 while(1){
	  i=text.find("Hoshino");
	  if(i!=string::not_found){
	   text[i+6]='a';
	  }else{
	   break;
	  }
	 }
	 cout<<text<<endl;
	}
}

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

int main()
{
	int n;
	char str[1001];

	scanf("%d", &n);
	for (int i = 0; i < n+1; i++) {
		fgets(str, 1001, stdin);
		str[strlen(str) - 1] = '\0';

		if(strstr(str, "Hoshino") != NULL) str[(strstr(str, "Hoshino") - str) + 6] = 'a';
		puts(str);
	}

	return 0;
}

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

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

int main()
{
	int n;
	char str[1024];

	cin >> n;

	for (int i = 0; i < n; i++){
		fgets(str, sizeof(str), stdin);

		int len = strlen(str);
		for (int j = 0; j < len - 6; j++){
			if (strncmp(&str[j], "Hoshino", 7) == 0){
				str[j + 6] = 'a';
			}
		}

		cout << str << endl;
}

	return (0);
}

C++: #include <iostream>
#include <string>
 
int main(void){
    std::string str;
    int N;
    std::cin >> N;
    std::cin.ignore();
    for(int i = 0; i < N; ++i){
        getline(std::cin, str);
        int pos;
        while((pos = str.find("Hoshino")) != -1){
            str.replace(pos, 7, "Hoshina");
        }
        std::cout << str << std::endl;
    }
}

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

using namespace std;

bool is_same(char *str1, char *str2) {
	while (1) {
		if (*str1 != *str2) return false;
		if (*str1 || *str2)
			++str1, ++str2;
		else
			return true;
	}
}

int main() {
	int n, count = 0;
	scanf("%d\n", &n);

	char str[1001];
	char str2[] = "Hoshino";
	while (scanf("%s", str) != EOF) {
		bool period = false;
		for (int i = 0; str[i]; ++i)
			if (str[i] == '.') str[i] = '\0', period = true;

		if ( is_same(str, str2) ) printf("Hoshina");
		else printf("%s", str);

		if (period) printf(".");

		char c = getchar(); if (c == 13) c = '\n';
		printf("%c", c);
		if (c == '\n' && ++count >= n) break;
	}
}

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<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	string str, judge = "";
	int n, count = -1;
	cin >> n;
	for (int i = 0; i < n; i++) {
		if (i == 0) { getline(cin, str); }
		getline(cin, str);
		for (int j = 0; j < str.size(); j++) {
			judge += str[j];
			//cout << judge << endl;
			if (str[j+1] == ' ' || j == str.size() - 1) {
				count++;
				if (judge == "Hoshino" && count == 0) {
					cout << "Hoshina";
				}
				else if (judge == "Hoshino." && count == 0) {
					cout << "Hoshina.";
				}
				else if (judge == " Hoshino" && count > 0) {
					cout << " Hoshina";
				}
				else if (judge == " Hoshino." && count > 0) {
					cout << " Hoshina.";
				}
				else {
					cout << judge;
				}
				judge = "";
			}
		}
		cout << endl;
		count = -1;
	}
	return 0;
}

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



int main(){
	std::string str;
	int data_num;
	std::cin >> data_num;
	std::cin.ignore();
	for(int i = 0; i < data_num; ++i){
		u_int loc = 0;
		u_int size;
		getline(std::cin, str);
		size = str.size();
		while(1){
			loc = str.find("Hoshino", loc);
			if(loc == std::string::npos || loc == size){
				break;
			}
			str[loc+6] = 'a';
			++loc;	
		}
		std::cout << str << std::endl;
	}
	
	return 0;
}

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

int main(){
    std::string buf;
    int n;
    
    std::cin >> n;
    // now, there is "\n ...." in the stream.
    // then, skip the initial '\n'.
    std::getline(std::cin,buf);
    
    for (int i=0;i < n;++i) {
        std::getline(std::cin,buf);
        size_t pos = 0; // index where we will start searching.
        
        while (true) {
            pos = buf.find("Hoshino",pos);
            if (pos == -1) {    // couldn't find.
                break;
            }else{
                buf.replace(pos,sizeof("Hoshino"),"Hoshina");
                pos += sizeof("Hoshina");
            }
        }
        std::cout << buf << std::endl;
    }
    
    return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <functional>
#include <iostream>
#include <map>
#include <set>
using namespace std;
typedef pair<int,int> P;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 2000000000
int main()
{
	int n;
	cin >> n;
	cin.get();
	for(int i=0;i<n;i++)
	{
		string s;
		getline(cin,s);
		for(int j=6;j<s.size();j++)
		{
			if(s.substr(j-6,7)=="Hoshino")
			{
				s.at(j)='a';
			}
		}
		cout << s << endl;
	}
	return 0;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <climits>

using namespace std;

inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}

typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)

const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
	int n;
	string str;
	
	getline(cin, str, '\n');
	n = toInt(str);

	int pos;
	REP(i, n) {
		getline(cin, str, '\n');

		if((pos = str.find("Hoshino")) != string::npos) {
			str[pos+6] = 'a';
		}

		cout << str << endl;
	}

	return 0;
}

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

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

	false = "Hoshino";
	true = "Hoshina";
	for(int i=0;i<num;i++){
		std::cin >> english;
		for(int j=0;j<english.length();j++){
			if(english[j]==false) english[j]=true;
		}
		std::cout << english;
	}
    return 0;
}