1- Conjugated attack of sulfur from potassium thiocyanate on
propiolamide.
2- Formation of ani?n on the nitrogen of the amide.
3- Intramolecular attack of nitrogen on sulfur atom, with cyanide anion
operating as leaving group.
Certainly, the cyanide anion is not a common leaving-group. In this
case it operated in this way because of two favorable facts:
intramolecular reaction, and attack on sulfer, which is a good
electrophile.
Hope it helps.
Gabriel Tojo
Consultant in Synthetic Organic Chemistry