An ether solution contains aniline, phenol, benzoic acid and nitrobenzene. It is shaken in turn with aqueous NaHCO3, then with aqueous NaOH, then with dilute HCl. Each aqueous layer is separated before the next step. Data (pKa at 298K): benzoic acid 4.2, phenol 10.0, H2CO3 (first ionisation) 6.4, anilinium ion 4.6. Which assignment of the four compounds is correct?