#include <bits/stdc++.h>
int main(void) {
  char x[1010];
  int n;
  int i;
  int a;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    fgets(x, 1010, stdin);
    for (a = 0; x[a] != '\n'; a++) {
      if (x[a] == 'H' && x[a + 1] == 'o' && x[a + 2] == 's' &&
          x[a + 3] == 'h' && x[a + 4] == 'i' && x[a + 5] == 'n' &&
          x[a + 6] == 'o')
        x[a + 6] = 'a';
    }
    for (a = 0; x[a + 1] != '\0'; a++) {
      printf("%c", x[a]);
    }
    printf("\n");
  }
  return 0;
}
