#include <bits/stdc++.h>
int main(void) {
  int n, i, j, c, string[7] = {'H', 'o', 's', 'h', 'i', 'n', 'o'};
  scanf("%d", &n);
  getchar();
  for (n = n; n > 0; n--) {
    i = 0;
    c = getchar();
    while (c != '\n') {
      if (c == string[i]) {
        if (i == 6) {
          printf("Hoshina");
          i = -1;
        }
        i++;
      } else if (i != 0) {
        for (j = 0; j < i; j++) {
          putchar(string[j]);
        }
        i = 0;
        putchar(c);
      } else {
        putchar(c);
      }
      c = getchar();
    }
    printf("\n");
  }
  return 0;
}
