#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  char str[100];
  char str2[100][1000];
  cin >> a;
  for (int i = 0; i < a; i++) {
    fgets(str2[i], 1000, stdin);
  }
  cout << endl;
  for (int i = 0; i < a; i++) {
    for (int j = 0; str2[i][j] != '\n'; j++) {
      if (str2[i][j] == 'H' && str2[i][j + 1] == 'o' && str2[i][j + 2] == 's' &&
          str2[i][j + 3] == 'h' && str2[i][j + 4] == 'i' &&
          str2[i][j + 5] == 'n' && str2[i][j + 6] == 'o') {
        str2[i][j + 6] = 'a';
      }
    }
  }
  for (int i = 0; i < a; i++) {
    printf("%s", str2[i]);
  }
}
