A Polynomial Time Algorithm for the Lambek Calculus With Brackets of Bounded Order