Experimental and theoretical studies on didehydrobenzenes and didehydropyridines