#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  char *ho = "Hoshino";
  for (int i = 0; i < (n + 1); ++i) {
    char c, s[2000];
    for (int j = 0; j < (2000); ++j) {
      scanf("%c", &c);
      if (c == '\n') {
        s[j] = '\0';
        break;
      } else {
        s[j] = c;
      }
    }
    for (int j = 0; s[j] != '\0'; ++j) {
      int f = 1;
      for (int k = 0; k < (7); ++k) {
        if (s[j + k] != ho[k]) {
          f = 0;
          break;
        }
      }
      if (f) s[j + 6] = 'a';
    }
    printf("%s\n", s);
  }
  return 0;
}
