Gale-Shapley matchmaking algorithm (stable marriage problem)