#include<stdio.h>
#include<string.h>
int main(){
    char s[2000];
    int n, i, j, key = 0;
    scanf("%c", &n);
    while( n-- ) {
        gets(s);
        for ( i = 0; i < strlen(s); i++ ) {
            if ( s[i] == 'H' ) {
                if ( s[i+1] == 'o' && s[i+2] == 's' && s[i+3] == 'h' && s[i+4] == 'i' && s[i+5] == 'n' && s[i+6] == 'o') {
                    s[i+6] = 'a';
                }
            }
        }
        printf("%s\n", s);
        key++;
    }    
    return 0;
}