Solves LCSM.