#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int D_Set;
  cin >> D_Set;
  for (int i = 0; i < D_Set; i++) {
    string text;
    getline(cin, text);
    while (1) {
      string::size_type pos = text.find("Hoshino");
      if (pos == string::npos) {
        break;
      } else {
        text[pos + 6] = 'a';
      }
    }
    cout << text << endl;
  }
  return 0;
}
