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

int main(){
  int n,j;
  string str;
  cin >> n;
  getline(cin, str);
  for(int i = 0; i<n;i++){

    getline(cin, str);

    j = 0;
    while(str.size() >= 7 && str[j+6] != '\0'){
      if(str[j] == 'H' && str[j+1] == 'o' && str[j+2] == 's' && str[j+3] == 'h' && str[j+4] == 'i' && str[j+5] == 'n' && str[j+6] == 'o') str[j+6] = 'a';
      j++;
    }
    cout << str << endl;
  }
    
  return 0;
}