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