Python3 program to implement the above approach To run this code , we need to copy modular inverse from below post . https : www . geeksforgeeks . org / multiplicative - inverse - under - modulo - m /
if __name__ == ' _ _ main _ _ ' : NEW_LINE