#include <bits/stdc++.h>
int main() {
  int n, i, j, k;
  char s[1003], h[9] = "Hoshino ";
  scanf("%d\n", &n);
  for (i = 0; i < n; i++) {
    fgets(s, 1000, stdin);
    for (j = 0; s[j] != 10; j++) {
      if (s[j] == 'H') {
        for (k = 1; k < 8; k++) {
          if (s[j + k] != h[k]) break;
        }
        if (k == 8) {
          s[j + 6] = 'a';
          j += 7;
        }
      }
    }
    printf("%s", s);
  }
  return 0;
}
