```Copyright (c) James A. Storer

Puzzle Contrast, Problem 4
(Go between the solutions for problems 1 and 2,
and exchange pieces X and Y.)

######################################################################
Rectilinear Solution
Rectilinear steps: 24
Straight-Line steps: 26
Unit steps: 38
######################################################################

#0:
B B A A
Y     X
D D C C

#1. Move X west 2 units:
B B A A
Y X
D D C C

#2. Move A south:
B B
Y X A A
D D C C

#3. Move B east 2 units:
B B
Y X A A
D D C C

#4. Move X on a path of 2 segments ending west:
X   B B
Y   A A
D D C C

#5. Move Y on a path of 2 segments ending north:
X Y B B
A A
D D C C

#6. Move A west 2 units:
X Y B B
A A
D D C C

#7. Move C north:
X Y B B
A A C C
D D

#8. Move D east 2 units:
X Y B B
A A C C
D D

#9. Move A south:
X Y B B
C C
A A D D

#10. Move C west 2 units:
X Y B B
C C
A A D D

#11. Move B south:
X Y
C C B B
A A D D

#12. Move Y east 2 units:
X     Y
C C B B
A A D D

#13. Move X east 2 units:
X Y
C C B B
A A D D

#14. Move C north:
C C X Y
B B
A A D D

#15. Move B west 2 units:
C C X Y
B B
A A D D

#16. Move D north:
C C X Y
B B D D
A A

#17. Move A east 2 units:
C C X Y
B B D D
A A

#18. Move B south:
C C X Y
D D
B B A A

#19. Move D west 2 units:
C C X Y
D D
B B A A

#20. Move X south:
C C   Y
D D X
B B A A

#21. Move Y south:
C C
D D X Y
B B A A

#22. Move C east 2 units:
C C
D D X Y
B B A A

#23. Move D north:
D D C C
X Y
B B A A

#24. Move X west 2 units:
D D C C
X     Y
B B A A

```