solver for the ultimate puzzle