Starting from propanoic acid, the following reactions were carried out: \[ \text{SOCl}_2 \rightarrow X \quad \text{NH}_3 \rightarrow Y \quad \text{Br}_2 + \text{KOH} \rightarrow Z \] \(\text{What is the compound Z?}\)