#include <bits/stdc++.h>
using namespace std;
string convert(string org) {
  string name = "Hoshino";
  int i = 0;
  int j = 0;
  while (org[i] != 0) {
    while (org[i] != 0 && name[j] != 0 && org[i] == name[j]) {
      ++i;
      ++j;
    }
    if (j == name.size()) {
      org[i - 1] = 'a';
      --i;
    }
    ++i;
    j = 0;
  }
  return org;
}
int main() {
  int n;
  string line;
  getline(cin, line);
  sscanf(line.c_str(), "%d", &n);
  for (int x = 0; x < n; ++x) {
    getline(cin, line);
    line = convert(line);
    cout << line << endl;
  }
  return 0;
}
