A characterization of all solutions to the four block general distance problem