while (True):
    n=int(input())
    if n==0:
        break
    D=[]
    for k in range(1,int(n)+1):
       a=input()
       D.append(a)
    for i in D:
        
        A=i.replace('Hoshino','Hoshina')
        print (A)
    else:
        break

