What o2 clip goes to each sensor on Ford ranger?

I had some exhaust work done and all the o2 sensors were disconnected. Now I don't know what female end goes to each o2 sensor. I have 2 blue and 2 green but nothing I can see to tell which one is what.

They will only fit in the correct one.