Identify B formed in the reaction.
$
\begin{aligned}
& \mathrm{Cl}-\left(\mathrm{CH}_2\right)_4-\mathrm{Cl} \xrightarrow{\text { excess } \mathrm{NH}_3} \mathrm{~A} \xrightarrow{\mathrm{NaOH}} \\
& \mathrm{~B}+\mathrm{H}_2 \mathrm{O}+\mathrm{NaCl}
\end{aligned}
$