#!/usr/bin/env python
from __future__ import division, print_function
from sys import stdin, exit


def main(readline=stdin.readline):
    for _ in range(int(readline())):
        words = readline().split()
        print(*('Hoshina' if w == 'Hoshino' else w for w in words))
    exit()


if __name__ == '__main__':
    main()