#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int n;
  string in;
  cin>>n;
  getline(cin,in);
  while(n--){
    string str;
    getline(cin,str);;
    if(str.size()<7){
      cout<<str<<endl;
      continue;
    }
    rep(i,str.size()-7){
      if(str[ i ] == 'H' && str[i+1] == 'o' && str[i+2] == 's' && str[i+3] == 'h' &&
	 str[i+4] == 'i' && str[i+5] == 'n' && str[i+6] == 'o'){
	str[i+6] = 'a';
      }
    }
    cout<<str<<endl;
  }

}