#include <bits/stdc++.h>
int main(void) {
  int c, f, n;
  scanf("%d", &n);
  scanf(" ");
  while (n--) {
    f = 0;
    while (1) {
      c = getchar();
      if (c == '\n') {
        putchar(c);
        break;
      }
      if (c == 'H' || c == 's' || c == 'h' || c == 'i' || c == 'n') {
        f++;
        putchar(c);
      } else if (c == 'o') {
        if (f == 6) {
          f = 0;
          putchar('a');
        } else {
          f++;
          putchar(c);
        }
      } else {
        f = 0;
        putchar(c);
      }
    }
  }
  return 0;
}
