Implemented solution choosing

Minimally tested, but works on the default code