#include <bits/stdc++.h>
using namespace std;
int compare(const std::string& buf, const std::string& str) {}
int main(int argc, char const* argv[]) {
  int n;
  std::string str1 = "Hoshino";
  std::string str2 = "Hoshina";
  int len = str1.length();
  scanf("%d\n", &n);
  for (int i = 0; i != int(n); i++) {
    std::string s;
    std::getline(std::cin, s);
    int k = 0;
    int l = s.length();
    while (k + 6 < l) {
      int n = 0;
      for (int j = 0; j < 7; j++) {
        if (s[k + j] != str1[j]) {
          n = j + 1;
          break;
        }
      }
      if (n == 0) {
        s[k + 6] = 'a';
        n = 7;
      }
      k += n;
    }
    std::cout << s << std::endl;
  }
  return 0;
}
