Use the continuity test to identify which wire is currently in which block and untangle your wired mess.