n = int(input())

key = 'Hoshino'

for i in range(n):
    line = input()

    while (1):
        key_pos = line.find(key)
        
        if key_pos != -1:
            line = line[:key_pos] + 'Hoshina' + line[key_pos + len('Hoshina'):]
        else:
            break
    
    print(line)

