Long answer: there are 3 lines on a body cord. Starting from the outside pin closer to the middle one, they are labeled A, B and C.
For foil/sabre the A line (close to the middle) goes to the alligator lame clip.
The B line goes to the skinny pin on a 2 prong, or the center of a bayonet. This is then connected to the wire that runs the length of the blade.
The C line (farthest from the center pin) goes to the fat pin, or the outside of a bayonet. The C line is ALWAYS connected to the bellguard and blade itself, all 3 weapons. It can be considered ground (save for sabre technically).
I hope this helps, it's usually easier to remember how to put things together if you know how it works.