#include <bits/stdc++.h>
char s[1001];
char w[8];
int main() {
  int n, i, j, k;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf(" %[^\n]s", s);
    for (j = 0; j <= strlen(s) - 7; j++) {
      for (k = 0; k < 7; k++) w[k] = s[j + k];
      w[7] = '\0';
      if (strcmp(w, "Hoshino") == 0) s[j + 6] = 'a';
    }
    printf("%s\n", s);
  }
}
