An organic compound \( (\mathrm{P}) \) on treatment with aqueous ammonia under hot condition forms compound \( (\mathrm{Q}) \) which on heating with \( \mathrm{Br_2} \) and \( \mathrm{KOH} \) forms compound \( (\mathrm{R}) \) having molecular formula \( \mathrm{C_6H_7N} \). Names of P, Q and R respectively are: