time=input()

for i in range(time):
    line=map(str,raw_input().split())
    for j in line:
        if j=="Hoshino":
            num=line.index("Hoshino")
            line[num]="Hoshina"
    for k in line:
        print k,
    print ""