#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  string rect = "Hoshino";
  for (int t = 0; t < n; ++t) {
    char str[2000];
    while (scanf("%s", str) != EOF) {
      for (int i = 0; str[i]; ++i) {
        for (int j = 0; j < rect.size() && str[i + j]; ++j) {
          if (str[i + j] != rect[j])
            break;
          else if (j == rect.size() - 1)
            str[i + j] = 'a';
        }
      }
      cout << str;
      char c = getchar();
      if (c == '\r' || c == '\n') break;
      cout << " ";
    }
    cout << endl;
  }
}
