n = int(input())
for i in range(n):
    data = list(input())
    for a in range(len(data)):
        if a>=6:
            if data[a-6] == "H" and data[a-5]=="o" and data[a-4]=="s" and data[a-3]=="h" and data[a-2]=="i" and data[a-1]=="n" and data[a]=="o" :
                data[a] = "a"
    new = "".join(data)
    print(new)
                    
