Which nation for much of the medieval period had a ceremonial emperor with little power and a military leader who actually governed?

England
Spain
Byzantine Empire
Japan