Polymers having terminal groups containing active hydrogen