Distance rationalization of voting rules