#include <bits/stdc++.h>
int main() {
  int line_num = 0;
  std ::string ori_sentence, new_sentence, word;
  std ::cin >> line_num;
  std ::getline(std ::cin, ori_sentence);
  for (int i = 0; i <= line_num; i++) {
    std ::getline(std ::cin, ori_sentence);
    std ::stringstream ss(ori_sentence);
    new_sentence = "";
    while (std ::getline(ss, word, ' ')) {
      if (word == "Hoshino") {
        word = "Hoshina";
      }
      if (new_sentence != "") {
        new_sentence += (' ' + word);
      } else {
        new_sentence += word;
      }
    }
    std ::cout << new_sentence << std ::endl;
  }
}
