Question

Why does hexane turn to Heptane here? I thought only 3, 4 ,5 cyclic rings transformed?

enter image description here