if canon_anc_1[-1] == org2:
            distance1 = 1
            distance2 = 0
        elif canon_anc_2[-1] == org1:
            distance1 = 0