Synthesis of 1-azabicyclic systems by double cyclization