I need to write out the mechanism of the reaction when anisole is reacted first with liquid ammonia and second with acid. Unfortunately, though, I have no idea where to start. I think, based on some quick googling, that it may form an amide, but this is a sort of rearrangement that leaves me completely bewildered.