#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string key = "Hoshino";
  cin >> n;
  cin.ignore();
  for (int i = 0; i < n; i++) {
    string str;
    int j = 0, k = 0;
    getline(cin, str);
    while (str[j] != 0) {
      if (key[k] == str[j])
        k++;
      else
        k = 0;
      if (k == 7) {
        if (str[j + 1] == ' ' || str[j + 1] == 0) {
          str[j] = 'a';
        }
        k = 0;
      }
      j++;
    }
    cout << str << endl;
  }
  return 0;
}
