Synthesis of flexible bicyclical nitrogenous heterocycles, their X-Ray crystallographic studies and biological activites