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