Implementation Of Find S Algorithm In Python