So the prince did what the horse told him ; he saddled and bridled the horse , he put the ointment on his hair till it shone like gold , and he made such a big fire in the stove that the flames sprang up and set fire to the roof , and in a few minutes the palace was burning like a huge bonfire .