输入输出样例
输入样例#1:
3
scarlet green blue yellow magenta cyan
blue pink green magenta cyan lemon
purple red blue yellow cyan green
2
red green blue yellow magenta cyan
cyan green blue yellow magenta red
2
red green gray gray magenta cyan
cyan green gray gray magenta red
2
red green blue yellow magenta cyan
magenta red blue yellow cyan green
3
red green blue yellow magenta cyan
cyan green hlue yellow magenta red
magenta red blue yellow cyan green
3
hlue green green green green blue
green blue blue ~Teen green green
green green green green green sea-green
3
red yellow red yellow red yellow
red red yellow yellow re,d yeUow
red red red red red red
4
violet violet salmon salmon salmon salmon
violet salmon salmon salmon salmon violet
violet violet salmon salmon violet violet
violet violet violet violet salmon salmon
1
red green hlue yellow magenta cyan
4
magenta pink red scarlet vermilion wine-red
aquamarine blue cyan indigo sky-blue
turciuoise-blue
blond cream chrome-yellow lemon olive yellow
chrome-green emerald-green ~r;reen olive vilidian
sky-blue
0