Bilateral matching with Latin squares