Introduction - If you have any usage issues, please Google them yourself
Gene by a gene string is a string that consists of finite length, wherein each gene can be used in the 26 capital letters to indicate a different type of letters different genes. A single gene may be grown to be a new gene, the rule is likely to grow by a limited set of rules determined by the growth. Each rule can be used to grow three capital letters A1A2A3 to describe the meaning of the rule A1 gene is a gene can grow A2A3. Uppercase letter S to represent a class of genes called super-gene as a gene sequence are each composed of a string of super-gene grown out according to the given rules. Please write a program that reads the limited growth of the rules and want to get some of our gene cluster, and then for each gene cluster, to determine whether it is the growth of super-gene cluster consists of a finite length can be derived. If you can, given the length of the shortest that can grow super-gene cluster of genes strings.