#include <bits/stdc++.h>
using namespace std;
int main() {
  const string search = "Hoshino";
  int n;
  cin >> n;
  cin.get();
  string text;
  while (n--) {
    getline(cin, text);
    for (int i = 0; i < (int)text.size();) {
      int j;
      for (j = 0; j < (int)search.size(); ++j) {
        if ((int)text.size() < i + j || search[j] != text[i + j]) {
          break;
        }
      }
      if (j == (int)search.size()) {
        text[i + j - 1] = 'a';
        i += j;
      } else {
        i += j + 1;
      }
    }
    cout << text << endl;
  }
  return 0;
}
