Implement a function that calculate the modular multiplicative inverse of a number in `Z/nZ`. Check out [Solidity Math Library](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/Math.sol) as a reference.