#include <bits/stdc++.h>
using namespace std;
int main() {
  int dataN, i, j, tmp;
  string str;
  cin >> dataN;
  for (j = 0; j < dataN; j++) {
    cin >> str;
    while (1) {
      tmp = str.find("Hoshino");
      if (tmp == -1) {
        break;
      }
      str[tmp + 6] = 'a';
    }
    cout << str;
  }
  return 0;
}
