A solution to POJ 1007, DNA Sorting