#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  char s[1050], ha[] = "Hoshina", ho[] = "Hoshino";
  cin >> n;
  while (n-- > 0) {
    fgets(s, 1050, stdin);
    for (int i = 0; i < strlen(s); i++) {
      if (!strncmp(&s[i], ho, 7) &&
          (s[i + 7] == ' ' || s[i + 7] == '\n' || s[i + 7] == '\0')) {
        strncpy(&s[i], ha, 7);
      }
    }
    cout << s;
  }
  return 0;
}
