programming puzzle solutions