N = int(raw_input())
for i in range(N):
    lis = raw_input().split(' ')
    ans = []
    for st in lis:
        if 'Hoshino' in st:
            while 'Hoshino' in st:
                s = st.find('Hoshino')
                st = st[:s]+'Hoshina'+st[s+7:]
            else:
                ans.append(st)
        else:
            ans.append(st)
    else:
        print ' '.join(ans)