#include <bits/stdc++.h>
using namespace std;
string str;
string hoshino = "Hoshino";
int hlen = hoshino.length();
void changeHoshino(int len) {
  for (int i = 0; i <= len - hlen; i++) {
    int j = 0;
    while ((j < hlen) && (str[i + j] == hoshino[j])) j++;
    if (j == hlen) str[i + j - 1] = 'a';
  }
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    getline(cin, str);
    changeHoshino(str.length());
    cout << str << endl;
  }
  return 0;
}
