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