#include <iostream>
#include <array>
#include <string>

int main(){
  int n;
  int i = 0;
  int flag = 0;
    std::array<std::string, 1000> str = {};

  std::cin >> n;

  while(n > 0){
    while(std::cin >> str[i]){
      ++flag;
        ++i;
    }
      for(int j = 0;j < flag;++j){
          if(str[j] == "Hoshino")
              str[j] = "Hoshina";
      }
      for(int j = 0;j < i;++j){
          std::cout << str[j];
      }
      std::cout << endl;
      
      flag = 0;
      i = 0;
      --n;
  }
}
