The conformations of macromolecules in interacting plane layers of grafted chains