Since your 3rd brakelight works it cannot be the switch.
With a multitester check the connectors at the brakelights for 12V when the pedal is pressed.
Set the MM on continuity and check the fuse, the bulbs and the lights themselves.
That should tell you where to go.