Suppose you have a ternary number system with three glyphs (let's say 0, 1, 2). The numbers 0 - 26 are represented as three-digit strings of these three glyphs. You could count 000, 001, 002, 010, 011 etc. You list these 27 numbers vertically, for example:
\begin{matrix} 1&2&2\\ 1&2&1\\ 1&0&1\\ 0&0&1\\ 2&2&2\\ 1&0&0\\ 1&2&0\\ \vdots&\vdots&\vdots \end{matrix}
As you can see, in the example above digits are arranged in clusters of three. By "cluster", I mean a group of similar digits that neighbor each other (a triomino of similar digits). Is it possible to arrange the entire set of 27 numbers this way?
Note: Groups of 6 similar digits are not allowed.