|10.In the illegal production of the drug, the pure D form cannot usually be synthesized for practical reasons, and the racemic mixture is made instead. One particular method starts with compound P, and this is converted to X by treatment with HI. Propose a mechanism for this transformation. OH group gets protonated by HI and leaves first. There is then neighbouring group participation by the adjacent sulfur group. I in the product is racemic.

Fig: 1

Fig: 2

Fig: 3