#include <bits/stdc++.h>
char *name = "Hoshina";
char *wrong_name = "Hoshino";
char *delim = " ";
int main(void) {
  int i, j, n, length, count, now;
  char buf[2];
  char istr[1002], istr_cpy[1002], *next;
  scanf("%d", &n);
  fgets(buf, sizeof(buf), stdin);
  for (i = 0; i < n; i++) {
    fgets(istr, sizeof(istr), stdin);
    length = strlen(istr);
    istr[length - 1] = '\0';
    for (j = 0; j < length; j++) istr_cpy[j] = istr[j];
    istr_cpy[j] = '\0';
    now = count = 0;
    next = strtok(istr, delim);
    while (next) {
      if (strcmp(wrong_name, next) == 0) {
        for (j = count; j >= 0; now++) {
          if (j == 0) break;
          if (istr_cpy[now] == ' ') {
            j--;
          }
        }
        for (j = 0; j < 7; j++) {
          istr_cpy[now + j] = name[j];
        }
      }
      count++;
      next = strtok(NULL, delim);
    }
    printf("%s\n", istr_cpy);
  }
  return 0;
}
