#include <bits/stdc++.h>
static const std::string MISS_STR = "Hoshino";
int main(void) {
  int n;
  std::cin >> n;
  getchar();
  while (0 < n--) {
    std::string str;
    std::getline(std::cin, str);
    const unsigned int str_size = str.size();
    unsigned int cur = 0;
    std::string::size_type pos = str.find(MISS_STR, 0);
    while (pos != std::string::npos && cur <= str_size) {
      str[pos + 6] = 'a';
      cur += (pos + MISS_STR.size());
      pos = str.find(MISS_STR, cur);
    }
    std::cout << str << std::endl;
  }
  return 0;
}
