import java.util.*;
public class Main {public static void main(String[] args) {Scanner a = new Scanner(System.in);int i = a.nextInt();a.nextLine();for(int j=0;j<i;j++)System.out.println(a.nextLine().replaceAll("Hoshino","Hoshina"));}}