Added basic solving logic without cube validation