organic mecanism of synthesis of heterocyclic compounds