#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d\n", &n);
  for (int i = 0; i < n; ++i) {
    string str = "";
    while (1) {
      char c;
      if (scanf("%c", &c) == EOF) c = '\n';
      if (c == ' ' || c == '\n') {
        if (str == "Hoshino")
          cout << "Hoshina";
        else
          cout << str;
        cout << c;
        str = "";
        if (c == '\n') break;
      } else
        str += c;
    }
  }
}
