Geometrical representation of languages

Let \(L\) be the language of strings of length \(3\) over the alphabet \(\{0, 1, 2\}\), made of the strings \(abc\) satisfying \(a+b+c\neq 0\bmod 3\) (equivalently, exactly two of the symbols should be equal, or the string should contain two symbols). Each position is represented by a color: , and . The complex representing \(L\) is a torus.

Let's first show an unfold version of the complex, where the external edges are to be glued together:

After gluing, one obtains a torus: