A solvable model of secondary structure formation in random hetero-polymers