Python · Variables, assignment and input
Sorting, reordering and fixing wires that were swapped all come down to exchanging two stored values.