#include <bits/stdc++.h>
int main(void) {
  char str[1001];
  char temp[1001];
  int i;
  int j;
  int k;
  int n;
  scanf("%d", &n);
  for (k = 0; k < n; k++) {
    scanf(" %[^\n]", str);
    i = 0;
    while (str[i] != '\0') {
      j = 0;
      while (str[i] != ' ') {
        temp[j] = str[i];
        if (i == strlen(str)) {
          break;
        }
        i++;
        j++;
      }
      temp[j] = '\0';
      if (strcmp("Hoshino", temp) == 0) {
        strcpy(temp, "Hoshina");
      }
      if (str[i] == ' ') {
        temp[j] = ' ';
        temp[j + 1] = '\0';
        i++;
      }
      printf("%s", temp);
    }
    printf("\n");
  }
  return (0);
}
