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