def kinda_order_mod(x, m):
 return order_mod(x, largest_factor_relatively_prime(m, x))

def kinda_order_mod ( x , m ) : return order_mod ( x , largest_factor_relatively_prime ( m , x ) )
return the order of x in the multiplicative group mod m .