Alín has 8 keys on a keyring. The keys are indistinguishable by sight and both sides of each key are the same. To be able to tell the keys apart, Alín puts a colored cap on each one. How many colors does Alín need?
Solution. At least two colors are definitely needed, since if every key were to draw a cap of the same color, the keys would still be indistinguishable.

Two colors are sufficient, for example, in the arrangement shown in the figure.

![](https://cdn.mathpix.com/cropped/2024_05_02_17a8e035479073b18410g-1.jpg?height=491&width=499&top_left_y=302&top_left_x=802)

This construction is good because it is neither rotationally nor axially symmetric. If Alíz grabs the keychain, she knows that the key $B$ is the one of the two adjacent black keys whose second neighbor is also black, and the other key is $A$. Once she has determined which is the $A$ and which is the $B$ key, the other keys are uniquely determined from there.

The method (in a sequence of four consecutive keys, the two outer and one more are black, all others are gray) works for any keychain containing at least 6 keys.