#include <bits/stdc++.h>
using namespace std;
string str;
int n;
string solve(string str) {
  for (int i = 0; i < str.size() - 6; i++) {
    if (str[i] == 'H')
      if (str[i + 1] == 'o')
        if (str[i + 2] == 's')
          if (str[i + 3] == 'h')
            if (str[i + 4] == 'i')
              if (str[i + 5] == 'n')
                if (str[i + 6] == 'o') str[i + 6] = 'a';
  }
  return str;
}
int main() {
  scanf("%d\n", &n);
  for (int i = 0; i < n; i++) {
    getline(cin, str);
    cout << solve(str) << endl;
  }
}
