Line end of this 4-way circuit?
Oh fun: I had to do this when I upgraded to a multi-location dimmer system!

It's not the third picture: that's a four-way switch.

If it's wired correctly, you just have to disconnect the black wire from the "Common" terminal on each of the three-way switches and then use a current detector to see which one is hot: that's your line!

Safest way, and to remove all doubt in case the circuit is wired "unconventionally":


Shut off power to the circuit.
Tag (so you can reconnect the same way) each black wire connecting to the three-way switches.
Disconnect the black wires from the three-way switches.
Restore power to the circuit.
Use current detector to find the hot black.  That's the line source for the circuit!


(If none of those four shows hot, test the red wires still connected to each three-way to find the line source.  And in that case don't recommend whomever wired it the first time ;)