Paragraph: Treatment of compound $\mathbf{O}$ with $\mathrm{KMnO}_{4} / \mathrm{H}^{+}$gave $\mathbf{P}$,…
Paragraph:
Treatment of compound $\mathbf{O}$ with $\mathrm{KMnO}_{4} / \mathrm{H}^{+}$gave $\mathbf{P}$, which on heating with ammonia gave $\mathbf{Q}$. The compound $\mathbf{Q}$ on treatment with $\mathrm{Br}_{2} / \mathrm{NaOH}$ produced $\mathbf{R}$. On strong heating, $\mathbf{Q}$ gave $\mathbf{S}$, which on further treatment with ethyl $2-$bromopropanoate in the presence of $\mathrm{KOH}$ followed by acidification, gave a compound $\mathbf{T}$.
Question:
The compound $\mathbf{R}$ is
Solution
Q to R is Hoffmann's bromamide degradation reaction S to T is Gabriel's phthalimide systhesis