Plxxx Help in string hashing

assume
a=[6,5,8,1,8,3,2,1,2,3,4,1,4]
b=[2,1,4,3,4,1,6,5,8,1,8,3,2]
here particularly i’ll talk about matching only even indexed element after some XYZ cyclic shift(if possible,here in given example it is possible
a_even_index_items =[6,8,8,2,2,4,4]
b_even_index_items =[2,4,4,6,8,8,2]
here 4 cyclic shift required here).
now i am applying string hashing for both even and odd.

prime=31;mod=int(1e9+7)
def set_prime(n):
----p[0]=1
----for i in range(1,n):
--------p[i]=(p[i-1]*prime)%mod

p=[0]*(100000+5)
set_prime(100000+5)

def even_rotate():
----print(‘even even even’)
----even_hash=0
----curr_hash=0
----m=n//2+(1 if(n%2) else 0)
----for i in range(0,n,2):
--------even_hash+=(b[i]*p[i//2])%mod
-------- curr_hash+=(a[i]*p[i//2])%mod
---- if(even_hash==curr_hash):;return 1
----else:
--------for i in range(0,n,2):
------------new_hash=(curr_hash-a[i//2])//prime+(a[i//2]*p[m-1])%mod …#######… mistake is here
------------ if(even_hash==new_hash):
----------------print(‘rotation found at’,i)
----------------return 1
------------ curr_hash=new_hash
----return 0
here i don’t undesstand why my function(even_rot) is not returning 1 for this array
i know there is a mistake in finding new_hash
#plxx help

anyone ??