For this Question: Harry is trying to find the chamber of secrets but the chamber of secrets is well protected by dark spells. To find the chamber Harry needs to find the initial position of the chamber. Harry knows the final position of the chamber is X. He also knows that in total, the chamber has been repositioned N times. During the i<sup>th</sup> repositioning, the position of the chamber is changed to (previous position * Arr[i]) % 1000000007.
Given X and Arr, help Harry find the initial position of the chamber.

Note:- The initial position of the chamber is less than 1000000007.The first line of the input contains two integers N and X.
The second line of the input contains N integers denoting Arr.

Constraints
1 <= N <= 100000
1 <= Arr[i] < 1000000007Print a single integer denoting the initial position of the chamber.Sample Input
5 480
1 4 4 3 1 

Sample Output
10

Explanation: Initial position = 10
After first repositioning position = (10*1)%1000000007 = 10
After second repositioning position = (10*4)%1000000007 = 40
After third repositioning position = (40*4)%1000000007 = 160
After fourth repositioning position = (160*3)%1000000007 = 480
After fifth repositioning position = (480*1)%1000000007 = 480, I have written this Solution Code: def inv(a,b,m):
    res = 1
    while(b):
        if b&1:
            res = (res*a)%m
        a = (a*a)%m
        b >>= 1
    return res

n,x = map(int,input().split())
a = list(map(int,input().split()))
m = 1000000007
for i in a:
    x = (x*inv(i,m-2,m))%m
print(x), In this Programming Language: Python, Now tell me if this Code is compilable or not?