for i in range(int(input())):
    doc = input().split()
    ans = []
    for s in doc:
        if 'Hoshino' in s:
            while 'Hoshino' in s:
                t = s.find('Hoshino')
                s = s[:t] + 'Hoshina' + s[s+7:]
        ans.append(s)
    print ' '.join(ans)
