#include<iostream>
#include<string>
using namespace std;

int main(void)
{
  int n,s;
  string str;

  cin >> n;
  
  for(int i = 0 ; i <= n ; i++)
    {
      getline(cin, str);
      s = str.size();
      
      for(int i = 0 ; i < s ; i++)
	{
	  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;
    }
  return 0;
}