n = int(raw_input())

for i in range(n):
    text = map(str,raw_input().split())
    
    m = len(text)
    
    for i in range(m):
        if text[i] == 'Hoshino':
            print 'Hoshina',
        else:
            print text[i],
    print ''
    