#include <bits/stdc++.h>
int main() {
  std::string buf;
  int n;
  std::cin >> n;
  std::getline(std::cin, buf);
  for (int i = 0; i < n; ++i) {
    std::getline(std::cin, buf);
    std::stringstream ss(buf);
    ss >> buf;
    if (buf == "Hoshino") {
      std::cout << "Hoshina";
    } else if (buf == "Hoshino,") {
      std::cout << "Hoshina, ";
    } else if (buf == "Hoshino.") {
      std::cout << "Hoshina. ";
    } else {
      std::cout << buf;
    }
    while (ss >> buf) {
      if (buf == "Hoshino") {
        std::cout << " Hoshina";
      } else if (buf == "Hoshino,") {
        std::cout << " Hoshina,";
      } else if (buf == "Hoshino.") {
        std::cout << " Hoshina.";
      } else {
        std::cout << " " << buf;
      }
    }
    std::cout << std::endl;
  }
  return 0;
}
