#include <bits/stdc++.h>
using namespace std;
template <class S, class T>
ostream& operator<<(ostream& os, pair<S, T> p) {
  os << '(' << (p.first) << ", " << (p.second) << ')';
  return os;
}
template <class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i = 1, len = v.size(); i < len; ++i) os << ' ' << v[i];
  return os;
}
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
int main() {
  int n;
  cin >> n;
  getchar();
  while (n--) {
    string s;
    getline(cin, s);
    for (int i = 0, st = 0; i < s.size(); ++i) {
      char c = s[i];
      if (st == 0 && c == 'H')
        st = 1;
      else if (st == 1 && c == 'o')
        st = 2;
      else if (st == 2 && c == 's')
        st = 3;
      else if (st == 3 && c == 'h')
        st = 4;
      else if (st == 4 && c == 'i')
        st = 5;
      else if (st == 5 && c == 'n')
        st = 6;
      else if (st == 6 && c == 'o')
        st = 7;
      else
        st = 0;
      if (st == 7) {
        st = 0;
        cout << 'a';
      } else {
        cout << c;
      }
    }
    cout << endl;
  }
  return 0;
}
