#include <bits/stdc++.h>
int main() {
  int i, j, n, flag = 0, d;
  char a[1000] = {0};
  scanf("%d%*c", &n);
  for (j = 0; j < n; j++) {
    flag = 0;
    for (i = 0;; i++) {
      scanf("%c", &a[i]);
      if (a[i] == '\n') {
        a[i] = 0;
        d = i;
        break;
      }
    }
    for (i = 0; i < d; i++) {
      if (flag == 0) {
        if (a[i] == 'H') flag++;
      } else if (flag == 1) {
        if (a[i] == 'o')
          flag++;
        else if (a[i] == 'H')
          flag = 1;
        else
          flag = 0;
      } else if (flag == 2) {
        if (a[i] == 's')
          flag++;
        else if (a[i] == 'H')
          flag = 1;
        else
          flag = 0;
      } else if (flag == 3) {
        if (a[i] == 'h')
          flag++;
        else if (a[i] == 'H')
          flag = 1;
        else
          flag = 0;
      } else if (flag == 4) {
        if (a[i] == 'i')
          flag++;
        else if (a[i] == 'H')
          flag = 1;
        else
          flag = 0;
      } else if (flag == 5) {
        if (a[i] == 'n')
          flag++;
        else if (a[i] == 'H')
          flag = 1;
        else
          flag = 0;
      } else if (flag == 6) {
        if (a[i] == 'o')
          a[i] = 'a';
        else if (a[i] == 'H')
          flag = 1;
        else
          flag = 0;
      }
    }
    printf("%s\n", a);
  }
  return 0;
}
