#include <bits/stdc++.h>
int main(int argc, char **argv) {
  char line[1001];
  const char *key = "Hoshino";
  int n;
  scanf("%d", &n);
  fgets(line, sizeof(line), stdin);
  while (n--) {
    fgets(line, sizeof(line), stdin);
    char *s = line;
    while (true) {
      s = strstr(s, key);
      if (s == NULL) break;
      s[6] = 'a';
      s += 7;
    }
    printf("%s", line);
  }
  return 0;
}
