Emergence of preferred structures in a simple model of protein folding