Text this: Successive algorithm for construction of equation of motion of constrained mechanical systems