Question 863759
For each choice you can pick 1 of 3 balls.
You have 3 choices to make so,
{{{N=3*3*3=27}}}
Easiest way to count is to make a chart with 3 columns.
In the 3rd column, place B,R,G alternately for 27 entries.
In the 2nd column, place B for 3 rows, R for 3 rows, G for 3 rows, then repeat.
In the 1st column, place B for 9 rows, R for 9 rows, G for 9 rows. 
That will get you all the values. 

BBB 
BBR 
BBG 
BRB 
BRR 
BRG 
BGB 
BGR 
BGG
RBB 
RBR 
RBG 
RRB 
RRR 
RRG 
RGB 
RGR 
RGG
GBB 
GBR 
GBG 
GRB 
GRR 
GRG 
GGB 
GGR 
GGG