There is a lot of info missing here, like how many lights, fans,
outlets, there are in the room With everything disconnected, and no
bare wires touching anything, turn on the breaker (most likely there is
only one and you know which one it is?). Use a tester or meter to
determine which cable is live. Now you know the feed into the box.
Shut off the breaker, verify the cable is now dead, then try hooking
this feed to each of the other cables, black to black, wht to wht.
Turn the breaker back on and see which lights/outlets work. Due that
with each of the cables and you should be able to figure out what runs
where and how to then hook it up.