1. Take a caliper and measure the maximum width of each chain. Sort them into 3 piles. The widest will be 6/7/8-speed. The narrowest will be 10-speed. If you don't have a caliper, use your least sloppy crescent wrench to gauge each chain.
2. Now sort each pile by length. The chain stay lengths and sprocket sizes should guide you in determining which chain goes with which bike.
3. Next time do this: Frozen food entrees often come in handy little plastic tubs. I save those to put all of the parts that I take off of a single bike into.