#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, len;
  string a;
  cin >> n;
  getline(cin, a);
  for (int i = 0; i < n; i++) {
    getline(cin, a);
    len = a.size();
    if (a[i] == 'H') {
      if (a[i + 1] == 'o')
        if (a[i + 2] == 's')
          if (a[i + 3] == 'h')
            if (a[i + 4] == 'i')
              if (a[i + 5] == 'n')
                if (a[i + 6] == 'o') a[i + 6] = 'a';
    }
    cout << a << endl;
  }
  return 0;
}
