#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, coll, i, j;
  ios::sync_with_stdio();
  char buffer[1001];
  scanf("%d", &n);
  cin.ignore();
  for (int k = 0; k < n; k++) {
    coll = 0;
    cin.getline(buffer, sizeof(buffer));
    for (j = 0; buffer[j] != '\0'; j++) {
      switch (coll) {
        case 0:
          if (buffer[j] == 'H') coll++;
          break;
        case 1:
          if (buffer[j] == 'o') coll++;
          break;
        case 2:
          if (buffer[j] == 's') coll++;
          break;
        case 3:
          if (buffer[j] == 'h') coll++;
          break;
        case 4:
          if (buffer[j] == 'i') coll++;
          break;
        case 5:
          if (buffer[j] == 'n') coll++;
          break;
        case 6:
          if (buffer[j] == 'o') {
            buffer[j] = 'a';
          }
        default:
          coll = 0;
          break;
      }
    }
    for (i = 0; i < j; i++) putchar(buffer[i]);
    putchar('\n');
  }
  return 0;
}
