#include <bits/stdc++.h>
int main(void) {
  int n, i;
  char a[1000][1000] = {0};
  char *p;
  scanf("%d\n", &n);
  for (i = 0; i < n; i++) gets(a[i]);
  for (i = 0; i < n; i++) {
    p = strstr(a[i], "Hoshino");
    p[6] = 'a';
  }
  for (i = 0; i < n; i++) puts(a[i]);
  return 0;
}
