Pathways of n-aminopyrrole synthesis