```

######################################################################
Rectilinear Solution
Rectilinear steps: 56
Straight-Line steps: 130
Unit steps: 186
######################################################################

#0:
\$   \$
A   1
B   2
C   3
D   4
Y S X
\$ S \$

#1. Move 4 on a path of 2 segments ending north:
\$   \$
A 4 1
B   2
C   3
D
Y S X
\$ S \$

#2. Move B on a path of 3 segments ending east:
\$   \$
A 4 1
2
C   3
D   B
Y S X
\$ S \$

#3. Move A on a path of 3 segments ending south:
\$   \$
4 1
2
C A 3
D   B
Y S X
\$ S \$

#4. Move C north 2 units:
\$   \$
C 4 1
2
A 3
D   B
Y S X
\$ S \$

#5. Move 4 on a path of 3 segments ending south:
\$   \$
C   1
2
4 A 3
D   B
Y S X
\$ S \$

#6. Move A on a path of 2 segments ending west:
\$   \$
C   1
A   2
4   3
D   B
Y S X
\$ S \$

#7. Move S north 5 units:
\$ S \$
C S 1
A   2
4   3
D   B
Y   X
\$   \$

#8. Move A on a path of 2 segments ending south:
\$ S \$
C S 1
2
4   3
D   B
Y A X
\$   \$

#9. Move B on a path of 2 segments ending north:
\$ S \$
C S 1
B 2
4   3
D
Y A X
\$   \$

#10. Move X on a path of 3 segments ending north:
\$ S \$
C S 1
B 2
4 X 3
D
Y A
\$   \$

#11. Move A on a path of 3 segments ending south:
\$ S \$
C S 1
B 2
4 X 3
D
Y   A
\$   \$

#12. Move X on a path of 2 segments ending east:
\$ S \$
C S 1
B 2
4   3
D   X
Y   A
\$   \$

#13. Move B south 3 units:
\$ S \$
C S 1
2
4   3
D   X
Y B A
\$   \$

#14. Move X on a path of 3 segments ending west:
\$ S \$
C S 1
X   2
4   3
D
Y B A
\$   \$

#15. Move 3 on a path of 3 segments ending north:
\$ S \$
C S 1
X   2
4 3
D
Y B A
\$   \$

#16. Move B on a path of 3 segments ending north:
\$ S \$
C S 1
X   2
4 3 B
D
Y   A
\$   \$

#17. Move 3 on a path of 2 segments ending east:
\$ S \$
C S 1
X   2
4   B
D   3
Y   A
\$   \$

#18. Move S south 5 units:
\$   \$
C   1
X   2
4   B
D   3
Y S A
\$ S \$

#19. Move X on a path of 2 segments ending south:
\$   \$
C   1
2
4 X B
D   3
Y S A
\$ S \$

#20. Move C on a path of 3 segments ending north:
\$   \$
C 1
2
4 X B
D   3
Y S A
\$ S \$

#21. Move X on a path of 3 segments ending north:
\$   \$
X C 1
2
4   B
D   3
Y S A
\$ S \$

#22. Move 3 on a path of 3 segments ending west:
\$   \$
X C 1
3   2
4   B
D
Y S A
\$ S \$

#23. Move C on a path of 2 segments ending east:
\$   \$
X   1
3   2
4   B
D   C
Y S A
\$ S \$

#24. Move 3 on a path of 2 segments ending south:
\$   \$
X   1
2
4   B
D 3 C
Y S A
\$ S \$

#25. Move 4 on a path of 3 segments ending south:
\$   \$
X   1
2
4 B
D 3 C
Y S A
\$ S \$

#26. Move D on a path of 3 segments ending north:
\$   \$
X D 1
2
4 B
3 C
Y S A
\$ S \$

#27. Move Y on a path of 2 segments ending east:
\$   \$
X D 1
Y 2
4 B
3 C
S A
\$ S \$

#28. Move X south 4 units:
\$   \$
D 1
Y 2
4 B
3 C
X S A
\$ S \$

#29. Move Y on a path of 2 segments ending north:
\$   \$
Y D 1
2
4 B
3 C
X S A
\$ S \$

#30. Move 4 on a path of 3 segments ending south:
\$   \$
Y D 1
2
B
4 3 C
X S A
\$ S \$

#31. Move 3 on a path of 3 segments ending south:
\$   \$
Y D 1
2
3   B
4   C
X S A
\$ S \$

#32. Move Y on a path of 3 segments ending south:
\$   \$
D 1
2
3 Y B
4   C
X S A
\$ S \$

#33. Move D on a path of 3 segments ending north:
\$   \$
D   1
2
3 Y B
4   C
X S A
\$ S \$

#34. Move Y on a path of 2 segments ending west:
\$   \$
D   1
Y   2
3   B
4   C
X S A
\$ S \$

#35. Move S north 5 units:
\$ S \$
D S 1
Y   2
3   B
4   C
X   A
\$   \$

#36. Move C on a path of 2 segments ending north:
\$ S \$
D S 1
Y C 2
3   B
4
X   A
\$   \$

#37. Move B on a path of 3 segments ending north:
\$ S \$
D S 1
Y C 2
3 B
4
X   A
\$   \$

#38. Move 2 on a path of 3 segments ending south:
\$ S \$
D S 1
Y C
3 B
4
X 2 A
\$   \$

#39. Move A on a path of 2 segments ending west:
\$ S \$
D S 1
Y C
3 B
4 A
X 2
\$   \$

#40. Move 1 south 4 units:
\$ S \$
D S
Y C
3 B
4 A
X 2 1
\$   \$

#41. Move A on a path of 2 segments ending north:
\$ S \$
D S A
Y C
3 B
4
X 2 1
\$   \$

#42. Move B on a path of 3 segments ending north:
\$ S \$
D S A
Y C B
3
4
X 2 1
\$   \$

#43. Move C on a path of 3 segments ending north:
\$ S \$
D S A
Y   B
3   C
4
X 2 1
\$   \$

#44. Move Y on a path of 3 segments ending east:
\$ S \$
D S A
B
3   C
4   Y
X 2 1
\$   \$

#45. Move 2 north 3 units:
\$ S \$
D S A
2 B
3   C
4   Y
X   1
\$   \$

#46. Move Y on a path of 2 segments ending north:
\$ S \$
D S A
2 B
3 Y C
4
X   1
\$   \$

#47. Move 1 on a path of 3 segments ending south:
\$ S \$
D S A
2 B
3 Y C
4
X 1
\$   \$

#48. Move Y on a path of 3 segments ending south:
\$ S \$
D S A
2 B
3   C
4
X 1 Y
\$   \$

#49. Move 2 on a path of 2 segments ending east:
\$ S \$
D S A
B
3   C
4   2
X 1 Y
\$   \$

#50. Move 1 on a path of 2 segments ending west:
\$ S \$
D S A
1   B
3   C
4   2
X   Y
\$   \$

#51. Move S south 5 units:
\$   \$
D   A
1   B
3   C
4   2
X S Y
\$ S \$

#52. Move 1 on a path of 2 segments ending south:
\$   \$
D   A
B
3 1 C
4   2
X S Y
\$ S \$

#53. Move D on a path of 3 segments ending north:
\$   \$
D A
B
3 1 C
4   2
X S Y
\$ S \$

#54. Move 1 on a path of 3 segments ending north:
\$   \$
1 D A
B
3   C
4   2
X S Y
\$ S \$

#55. Move 2 on a path of 3 segments ending west:
\$   \$
1 D A
2   B
3   C
4
X S Y
\$ S \$

#56. Move D on a path of 2 segments ending east:
\$   \$
1   A
2   B
3   C
4   D
X S Y
\$ S \$

```