def sdm_monomial_lcm(A, B):
 return ((A[0],) + monomial_lcm(A[1:], B[1:]))

def sdm_monomial_lcm ( A , B ) : return ( ( A [ 0 ] , ) + monomial_lcm ( A [ 1 : ] , B [ 1 : ] ) )
return the "least common multiple" of a and b .