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