I did run the above and did not find any case where no triplet was sharing the same number. Neither did I for 326. But Robin Ryder told me that this is a well-known problem in graph theory that goes under the name of Ramsey’s problem and that 327 is an upper bound on the number of nodes for the existence of the triplet with 5 colours. So this is another illustration of a case when crude simulation cannot exhibit limiting cases in order to void a general property, because of the number of possible cases.

Incidentally, I wonder if there is a faster way to produce a random symmetric matrix than the cumbersome