Give 1 a color first, and choose five.
Then it is divided into two situations.
The first one: No.2 and No.4 are the same color. In this case, there are four choices (because 1 has four colors left), and then there are three choices for No.3 and No.5. So in this case * * * has 4*3*3=36 options.
Second: No.2 and No.4 have different colors. In this case, there are 4*3= 12 choices (No.2, No.4, No.4 and No.3 choices), and then No.3 and No.5 have 2 choices, so in this case, * * has 12 * 2 = 48 choices.
All in all,
There are 5 * * (36+48) = 420 options.