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