  We propose a new toy model of a heteropolymer chain capable of forming planar
secondary structures typical for RNA molecules. In this model the sequential
intervals between neighboring monomers along a chain are considered as quenched
random variables. Using the optimization procedure for a special class of
concave--type potentials, borrowed from optimal transport analysis, we derive
the local difference equation for the ground state free energy of the chain
with the planar (RNA--like) architecture of paired links. We consider various
distribution functions of intervals between neighboring monomers (truncated
Gaussian and scale--free) and demonstrate the existence of a topological
crossover from sequential to essentially embedded (nested) configurations of
paired links.
