A facile and versatile synthesis of heteropolycyclic compounds from 4-amino-1-azabutadienes via friedel-crafts cyclization of their heterocyclic derivatives.