import java.io.*;

public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(in.readLine());
		for(int i=0;i<n;i++)
			System.out.println(in.readLine().replaceAll("Hoshino", "Hoshina"));
	}
}