#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d ", &n);
  string a[2];
  for (int i = 0; i < n; i++) {
    getline(cin, a[i]);
    while (1) {
      string::size_type index;
      index = a[i].find("Hoshino", index);
      if (string::npos == index) break;
      a[i][index + 6] = 'a';
    }
  }
  for (int i = 0; i < n; i++) {
    cout << a[i] << "\n";
  }
}
