Bend the pins 20\40 at an angle of 90 degrees to the left, that the contact was located parallel to the Board under the top cover. then all the wires you will be able to place in the housing. If possible, you can trim off the excess wire and solder the connector to the wires of the fan with minimum length (which would have been just enough to connect to the connector on the Board).