Tom needs to paint a straight fence consisting of 6 panels. He has green, red, and magenta paint, and each panel should be painted with only one color.
How many ways are there to paint the fence?