Optimal shapes of compact strings.

Optimal shapes of compact strings.