#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, len;
  char str[1000];
  cin >> n;
  for (int i = 0; i < n; i++) {
    gets(str);
    len = strlen(str);
    if (len < 7)
      cout << str << endl;
    else {
      for (int j = 0; j <= len - 7; j++) {
        if (str[j] != 'H') continue;
        if (str[j + 1] == 'o' && str[j + 2] == 's' && str[j + 3] == 'h' &&
            str[j + 4] == 'i' && str[j + 5] == 'n' && str[j + 6] == 'o') {
          str[j + 6] = 'a';
        }
      }
      puts(str);
    }
  }
  return 0;
}
