if you keep a count dimension for the number of locations visited and add constraints that
count of A should be within +/- 2 of count of E
count of A should be within +/- 2 of count of C
... similarly total 6(n * (n-1), n=3) constraints
it should suffice, right ?