Gale-Shapley stable matching algorithm implemented in Java.