#include <bits/stdc++.h>
int main() {
  int len;
  int i, j, k, n;
  int count = 0;
  char name[] = "Hoshino";
  char word[100];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    gets(word);
    len = strlen(word);
    for (j = 0; j < len; j++) {
      if (word[j] == 'H') {
        for (k = 0; k < 7; k++) {
          if (word[j + k] == name[k]) count++;
        }
        if (count == 7) {
          word[j + 6] = 'a';
        }
        count = 0;
      }
    }
    printf("%s\n", word);
  }
  return 0;
}
