#include<iostream.h>
#include<iomanip.h> 
 enum color{red,yellow,blue,white,black};
 int main()
{
 color temp;
 int i,j,k,m,count;
 for(i=red,count=0;i<=black;i++)
  for(j=red;j<=black;j++)
   if(i!=j)
   {
    for(k=red;k<=black;k++)
     if(k!=i&&k!=j)
	 {
	  count++;
	  cout<<setw(4)<<count;
	  for(m=1;m<=3;m++)
	  {
	   switch(m)
	   {
	    case 1: temp=(color)i;break;
	    case 2: temp=(color)j;break;
   	    case 3: temp=(color)k;break;
	   }
	   switch(temp)
	   {
	    case red:    cout<<setw(8)<<"红球";break;
	    case yellow: cout<<setw(8)<<"黄球";break;
	    case blue:   cout<<setw(8)<<"蓝球";break;
	    case white:  cout<<setw(8)<<"白球";break;
	    case black:  cout<<setw(8)<<"黑球";
	   }
	  }
	  cout<<endl;
	 }
   }
 cout<<"一共有"<<count<<"种取法"<<endl;
 return(0);
}