#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, j;
  int flg;
  char c, l;
  cin >> n;
  c = getchar();
  for (j = 0; j < n; j++) {
    flg = 0;
    l = 0;
    while (1) {
      c = getchar();
      if (c == '\n') {
        if (l != 0) {
          break;
        } else {
          continue;
        }
      } else {
        switch (flg) {
          case 0:
            if (c == 'H') {
              flg++;
            }
            break;
          case 1:
            if (c == 'o') {
              flg++;
            } else {
              flg = 0;
            }
            break;
          case 2:
            if (c == 's') {
              flg++;
            } else {
              flg = 0;
            }
            break;
          case 3:
            if (c == 'h') {
              flg++;
            } else {
              flg = 0;
            }
            break;
          case 4:
            if (c == 'i') {
              flg++;
            } else {
              flg = 0;
            }
            break;
          case 5:
            if (c == 'n') {
              flg++;
            } else {
              flg = 0;
            }
            break;
          case 6:
            if (c == 'o') {
              c = 'a';
            }
            flg = 0;
            break;
        }
        cout << c;
        l++;
      }
    }
    cout << endl;
  }
  return 0;
}
