#include <bits/stdc++.h>
using namespace std;
int n;
char str[1001];
char check[] = "Hoshino";
void solve();
int counter(char str[]);
int main() {
  cin >> n;
  for (int i = 0; i <= n; i++) {
    gets(str);
    solve();
  }
  return 0;
}
int counter() {
  int ans = 0;
  for (;; ans++) {
    if (str[ans] == '\n') {
      break;
    }
  }
  return ans;
}
void solve() {
  int L = counter();
  int C = 0;
  for (int i = 0; i < L - 6; i++, C = 0) {
    for (int j = i; C < 7; j++) {
      if (str[j] == check[C]) {
        C++;
      } else
        break;
    }
    if (C == 7) {
      str[i + C - 1] = 'a';
    }
  }
  printf("%s\n", str);
}
