Which of the following compound will undergo rearangement?

**Question**
[![enter image description here](https://i.stack.imgur.com/GgtvR.jpg)](https://i.stack.imgur.com/GgtvR.jpg)


**Attempt**
I believe the answer should be B,C and D. In C and D the oxyge(or Nitrogen in D) can rearange by donating lone pair to carbocation.


But the books answer says B. Where am I wrong. Please help.


