Pick two wires, attach a battery to them, test the other end to find which ones have a voltage between them. Or, just twist them together and check for resistance, but this will take a few more trials to differentiate the wires - in the first example, the battery polarity lets you know which is which.