There is only one way to connect the cable. You only use the three rightmost pins and there is only one way to insert it, with the notch pointing upward.
First of all, please note that I have awarded you a Correct Answer!
Thanks for that clarification. WIth the CPU cooler installed it is hard to see way back there.
I'll reconnect it with a long pair of tweezers I have. Then I will secure the fan cable with a cable tie so it won't come out again.
With the CPU cooler installed it is a bit of a challenge, but the connector grabbed with tweezers in one hand and a flashlight in the other works. I have done it several times, but you need these long pronged tweezers, normally used for electrical work. Even the tweezers on a Leatherman Wave work quite good.
I was in a hardware store years ago and found tweezers 12 inches long. I couldn't resist.
I'm glad I finally found a use for them.