n=int(input())
n=int(input())
for i in range(n):
	inputs=list(map(str,input().split()))
	ans=""
	for j in inputs:
		if j[:7]=="Hoshino":
			ans+="Hoshina "
			#print("Hoshina",end=" ")
		else:
			ans+=j+" "
			#print(j,end=" ")
	ans=ans[:-1]
	print(ans)