Welcome. My name is ***** ***** would be glad to assist.
Unfortunately, there are wiring diagrams provided by manufacturers on ceiling fans.
They are mass produced and change constantly with the components and the different possible wiring connections.
Along with the MANY types of pull chain switches too.
The first item, is to get an Exact replacement that has the contact configuration, or else it throws off the speed scheme entirely.
See the below for some of the most common configurations, one may match but there is no certainty with the fans
There are many times we have to play with them on service calls since they be broken or dismantled by the customer.
Start with the live power on L and then try the different capacitor connections.
Put some short wires into the switch and then you can twist them to the other wires in the fan to make changes easily.
Once the wires are pushed into the switches, they tend to not want to come out.
CLICK HERE to view a few possibilities
Wish there was an easier way, but unfortunately trial and error is the only option at this point
Keep me posted, will be glad to continue with other options, keep track of partial operations and it will assist later