n = int(input())
sentences = [str(input()) for i in range(n)]
for sentence in sentences:
	sentence = sentence.split(' ')
	for word in range(len(sentence)):
		if sentence[word] == 'Hoshino':
			sentence[word] = 'Hoshina'
	print(' '.join(sentence)) 