partially working cky algo