#include <bits/stdc++.h>
int main() {
  int n, i, j;
  char s[1003];
  scanf("%d\n", &n);
  for (i = 0; i < n; i++) {
    fgets(s, 1002, stdin);
    for (j = 0; s[j] != 0; j++) {
      if (s[j++] == 'H') {
        if (s[j++] == 'o') {
          if (s[j++] == 's') {
            if (s[j++] == 'h') {
              if (s[j++] == 'i') {
                if (s[j++] == 'n') {
                  if (s[j++] == 'o') {
                    if (!('a' <= s[j] && s[j] <= 'z')) {
                      if (!('A' <= s[j] && s[j] <= 'Z')) {
                        s[j - 1] = 'a';
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    printf("%s", s);
  }
  return 0;
}
