The electron-rich nitrogen atom would attack the electrophilic center, forming a heterocyclic compound.

Ring-closure
The IR spectra of the product have a strong peak at corresponding to N-H vibrations, and medium peaks at that correspond to the vibration of the bond.
From the mass spectra, the molecular formula of the compound can be deducted as follows:
Mass spectra of the molecular ion= 71
A value of the m/z ratio indicates the presence of a nitrogen atom in the compound.
The number of possible carbon atom
a. From above, 5 carbons atoms with 9 hydrogen atoms would be present in the compound.
b. Replacing one carbon atom with a nitrogen atom gives the formula