The twenty-first century is a biology-technology developing century. One
of the most attractive and challenging tasks is on the gene project,
especially on gene sorting program. Recently we know that a gene is made
of DNA. The nucleotide bases from which DNA is built are A(adenine),
C(cytosine), G(guanine), and T(thymine). Given several segments of a
gene, you are asked to make a shortest sequence from them. The sequence
should use all the segments, and you cannot flip any of the segments.
For example, given 'TCGG', 'GCAG', 'CCGC', 'GATC' and 'ATCG', you can
slide the segments in the following way and get a sequence of length 11.
It is the shortest sequence (but may be not the only one).