#include <bits/stdc++.h>
int main(void) {
  char str[1001];
  int n;
  int i, j;
  scanf("%d", &n);
  fgets(str, 1001, stdin);
  for (j = 0; j < n; j++) {
    fgets(str, 1001, stdin);
    i = 0;
    while (str[i] != '\0') {
      if (strncmp(&str[i], "Hoshino", 7) == 0) {
        strncpy(&str[i], "Hoshina", 7);
      }
      i++;
    }
    printf("%s", str);
  }
  return (0);
}
