#include <stdio.h>

int main(void) {
	// your code goes here
	int x,y,z;
	for(x=0;x<=20;x++)
	{
		for(y=0;y<=33;y++)
		{
		    for(z=0;z<=100;z=z+3)
		    {
		if(5*x+3*y+z/3==100&&x+y+z==100)
		{
		printf("公鸡%d只，母鸡%d只，小鸡%d只",x,y,z);
		}
		    }
		}
	}
	return 0;
}
