def inverse(x): assert x!=0 return 1/x