#include <bits/stdc++.h>
int main() {
  int a;
  std::cin >> a;
  for (int i = 0; i < a; i++) {
    std::string str;
    std::getline(std::cin, str);
    for (int j = 0; j < str.size(); j++) {
      if (str[j] == 'H' && str[j + 1] == 'o' && str[j + 2] == 's' &&
          str[j + 3] == 'h' && str[j + 4] == 'i' && str[j + 5] == 'n' &&
          str[j + 6] == 'o') {
        str[j + 6] = 'a';
      }
    }
    std::cout << str << std::endl;
  }
  return 0;
}
