Find out which colors are the A pair and the B pair.
If you have the motors already disconnected, then finding the pairs is easy:
1. With all the wires coming out of your motor separated (isolated) spin the rotor with your fingers. Feel how much mechanical effort it takes to roll the shaft.
2. Pick any two colored wires coming out of your motor(s) and short them together.
3. Now roll the shaft of the motor again. If it got very hard to roll over, then you found either the A pair or the B pair.
4. If the motor shaft is still easy to roll over, you haven't found a pair - so pick another set of colors and try that.
5. You will eventually find two pairs of colors that are your A pair and your B pair (which make the shaft hard to turn over).
6. Compare to the color assignment in the attached drawing.
Now, for wiring. (Try one motor first before wiring up all the motors). I think the color code in the attached drawing is pretty standard.
Hope it helps.