Use an ohm meter to find the ground of the trailer. This will go to - post on battey. All others with a resistance to ground will go on the + post of battery. If wire are too short, turn battery 180 degrees. GOod luck and in the future maybe take a digital photo of the cables & battery and mark them to corresponding terminal locations.
Mike, RVIA & RVSA Certified Master RV Technician
Amy, Dr Assistant - Roxie & Mei Ling, four legs each
2000 Gulf Stream Scenic Cruiser 350 ISC w/ Banks = 450Hp & 1330# torque
06 Saturn Vue & 06 Chevy Z71 4x4 toads