Use a multimeter’s continuity mode. Open the charger brick (careful with capacitors!) and trace where each wire connects to the PCB: