#include <iostream>
int main()
{
  int n;
  std::cin >> n;
  std::string line;
  std::getline(std::cin, line);
  while (n--) {
    std::getline(std::cin, line);
    
    int i;
    while ((i = line.find("Hoshino")) != std::string::npos) {
      line.replace(i, 7, "Hoshina");
    }
    std::cout << line << std::endl;
  }
  return 0;
}
#include <stdio.h>

int main(){
char name[12];

scanf("%[^\n]", &name);
name[3] = '8';
printf("%s", name);

	return 0;
}