SPOJ Stable_Marriage_Problem