import itertools def isKadomatsu(A): if A[0]==A[1] or A[1]==A[2] or A[0]==A[2]: return False elif A[0]A[2]: return True elif A[0]>A[1] and A[1]