For this Question: Given two integers ‘a’ and ‘m’. The task is to find modular multiplicative inverse of ‘a’ under modulo ‘m’.
Note: Print the smallest modular multiplicative inverse.First line of input contains a single integer T denoting number of test cases, next T lines contains two space separated integers depicting value of a and m.

Constraints :-
1 < = T < = 100
1 < = m < = 100
1 < = a < = mFor each test case, in a new line print the modular multiplicative inverse if exist else print -1.Sample Input:-
2
3 11
10 17

Sample Output:-
4
12, I have written this Solution Code: def modInverse(a, m):
	for x in range(1, m):
		if (((a%m)*(x%m) % m )== 1):
			return x
	return -1 
	
	 
t = int(input())
for i in range(t):
  a ,m = map(int , input().split())
  print(modInverse(a, m)), In this Programming Language: Python, Now tell me if this Code is compilable or not?