MRG function

Maximal ribbonless graph