#include <bits/stdc++.h>
int main(void) {
  int a, b, n;
  char english[1000], correct[] = "Hoshino", *c;
  scanf("%d\n", &n);
  for (a = 0; a < n; a++) {
    fgets(english, 1000, stdin);
    for (b = 0, c = strstr(english, correct); c != NULL; b++) {
      if (b == 0) {
        if (c != NULL) {
          c[6] = 'a';
        }
        continue;
      }
      c = strstr(english, correct);
      if (c != NULL) {
        c[6] = 'a';
      }
    }
    printf("%s", english);
  }
  return 0;
}
