Implemented student pairing problem.