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