#include <bits/stdc++.h>
int main(void) {
  int i, j, n;
  char a[1000];
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    fgets(a, sizeof(a), stdin);
    if (a[i] == 'h' && a[i + 1] == 'o' && a[i + 2] == 's' && a[i + 3] == 'h' &&
        a[i + 4] == 'i' && a[i + 5] == 'n' && a[i + 6] == 'o') {
      a[i + 6] = 'a';
      printf("%s\n", &a[i]);
    }
  }
  return 0;
}
