```

Clouds And Sheep Problem 2

######################################################################
Rectilinear Solution
Rectilinear steps: 113
Straight-Line steps: 131
Unit steps: 166
######################################################################

#0:
A A B C 2 S
1 1     2 2
M 1 X X Y Z

#1. Move B south:
A A   C 2 S
1 1 B   2 2
M 1 X X Y Z

#2. Move C west:
A A C   2 S
1 1 B   2 2
M 1 X X Y Z

#3. Move 2 west:
A A C 2   S
1 1 B 2 2
M 1 X X Y Z

#4. Move S west:
A A C 2 S
1 1 B 2 2
M 1 X X Y Z

#5. Move Z north 2 units:
A A C 2 S Z
1 1 B 2 2
M 1 X X Y

#6. Move Y on a path of 2 segments ending north:
A A C 2 S Z
1 1 B 2 2 Y
M 1 X X

#7. Move X east 2 units:
A A C 2 S Z
1 1 B 2 2 Y
M 1     X X

#8. Move B on a path of 2 segments ending east:
A A C 2 S Z
1 1   2 2 Y
M 1   B X X

#9. Move C south 2 units:
A A   2 S Z
1 1   2 2 Y
M 1 C B X X

#10. Move 2 west:
A A 2   S Z
1 1 2 2   Y
M 1 C B X X

#11. Move S west:
A A 2 S   Z
1 1 2 2   Y
M 1 C B X X

#12. Move Y on a path of 2 segments ending north:
A A 2 S Y Z
1 1 2 2
M 1 C B X X

#13. Move X north:
A A 2 S Y Z
1 1 2 2 X X
M 1 C B

#14. Move B east 2 units:
A A 2 S Y Z
1 1 2 2 X X
M 1 C     B

#15. Move C east 2 units:
A A 2 S Y Z
1 1 2 2 X X
M 1     C B

#16. Move 2 south:
A A   S Y Z
1 1 2   X X
M 1 2 2 C B

#17. Move X west:
A A   S Y Z
1 1 2 X X
M 1 2 2 C B

#18. Move S west:
A A S   Y Z
1 1 2 X X
M 1 2 2 C B

#19. Move Y west:
A A S Y   Z
1 1 2 X X
M 1 2 2 C B

#20. Move Z west:
A A S Y Z
1 1 2 X X
M 1 2 2 C B

#21. Move B north 2 units:
A A S Y Z B
1 1 2 X X
M 1 2 2 C

#22. Move C east:
A A S Y Z B
1 1 2 X X
M 1 2 2   C

#23. Move X east:
A A S Y Z B
1 1 2   X X
M 1 2 2   C

#24. Move 2 east:
A A S Y Z B
1 1   2 X X
M 1   2 2 C

#25. Move S south 2 units:
A A   Y Z B
1 1   2 X X
M 1 S 2 2 C

#26. Move Y on a path of 2 segments ending south:
A A     Z B
1 1 Y 2 X X
M 1 S 2 2 C

#27. Move Z west 2 units:
A A Z     B
1 1 Y 2 X X
M 1 S 2 2 C

#28. Move B west 2 units:
A A Z B
1 1 Y 2 X X
M 1 S 2 2 C

#29. Move X north:
A A Z B X X
1 1 Y 2
M 1 S 2 2 C

#30. Move C north:
A A Z B X X
1 1 Y 2   C
M 1 S 2 2

#31. Move 2 east:
A A Z B X X
1 1 Y   2 C
M 1 S   2 2

#32. Move B south 2 units:
A A Z   X X
1 1 Y   2 C
M 1 S B 2 2

#33. Move Z on a path of 2 segments ending south:
A A     X X
1 1 Y Z 2 C
M 1 S B 2 2

#34. Move A east 2 units:
A A X X
1 1 Y Z 2 C
M 1 S B 2 2

#35. Move 1 north:
1 1 A A X X
1 Y Z 2 C
M   S B 2 2

#36. Move M north:
1 1 A A X X
M 1 Y Z 2 C
S B 2 2

#37. Move S west 2 units:
1 1 A A X X
M 1 Y Z 2 C
S     B 2 2

#38. Move B west 2 units:
1 1 A A X X
M 1 Y Z 2 C
S B     2 2

#39. Move Z on a path of 2 segments ending west:
1 1 A A X X
M 1 Y   2 C
S B Z   2 2

#40. Move 2 west:
1 1 A A X X
M 1 Y 2   C
S B Z 2 2

#41. Move C south:
1 1 A A X X
M 1 Y 2
S B Z 2 2 C

#42. Move X south:
1 1 A A
M 1 Y 2 X X
S B Z 2 2 C

#43. Move A east 2 units:
1 1     A A
M 1 Y 2 X X
S B Z 2 2 C

#44. Move Y on a path of 2 segments ending east:
1 1   Y A A
M 1   2 X X
S B Z 2 2 C

#45. Move 1 east:
1 1 Y A A
M   1 2 X X
S B Z 2 2 C

#46. Move M east:
1 1 Y A A
M 1 2 X X
S B Z 2 2 C

#47. Move S north:
1 1 Y A A
S M 1 2 X X
B Z 2 2 C

#48. Move B west:
1 1 Y A A
S M 1 2 X X
B   Z 2 2 C

#49. Move M south:
1 1 Y A A
S   1 2 X X
B M Z 2 2 C

#50. Move 1 west:
1 1   Y A A
S 1   2 X X
B M Z 2 2 C

#51. Move Y on a path of 2 segments ending south:
1 1     A A
S 1 Y 2 X X
B M Z 2 2 C

#52. Move A west 2 units:
1 1 A A
S 1 Y 2 X X
B M Z 2 2 C

#53. Move X north:
1 1 A A X X
S 1 Y 2
B M Z 2 2 C

#54. Move C north:
1 1 A A X X
S 1 Y 2   C
B M Z 2 2

#55. Move 2 east:
1 1 A A X X
S 1 Y   2 C
B M Z   2 2

#56. Move Y on a path of 2 segments ending south:
1 1 A A X X
S 1     2 C
B M Z Y 2 2

#57. Move A south:
1 1     X X
S 1 A A 2 C
B M Z Y 2 2

#58. Move X west 2 units:
1 1 X X
S 1 A A 2 C
B M Z Y 2 2

#59. Move C north:
1 1 X X   C
S 1 A A 2
B M Z Y 2 2

#60. Move 2 north:
1 1 X X 2 C
S 1 A A 2 2
B M Z Y

#61. Move Y east 2 units:
1 1 X X 2 C
S 1 A A 2 2
B M Z     Y

#62. Move Z east 2 units:
1 1 X X 2 C
S 1 A A 2 2
B M     Z Y

#63. Move M east 2 units:
1 1 X X 2 C
S 1 A A 2 2
B     M Z Y

#64. Move B east 2 units:
1 1 X X 2 C
S 1 A A 2 2
B M Z Y

#65. Move S south:
1 1 X X 2 C
1 A A 2 2
S   B M Z Y

#66. Move 1 south:
X X 2 C
1 1 A A 2 2
S 1 B M Z Y

#67. Move X west 2 units:
X X     2 C
1 1 A A 2 2
S 1 B M Z Y

#68. Move A north:
X X A A 2 C
1 1     2 2
S 1 B M Z Y

#69. Move M on a path of 2 segments ending west:
X X A A 2 C
1 1 M   2 2
S 1 B   Z Y

#70. Move Z on a path of 2 segments ending north:
X X A A 2 C
1 1 M Z 2 2
S 1 B     Y

#71. Move Y west 2 units:
X X A A 2 C
1 1 M Z 2 2
S 1 B Y

#72. Move 2 south:
X X A A   C
1 1 M Z 2
S 1 B Y 2 2

#73. Move C south:
X X A A
1 1 M Z 2 C
S 1 B Y 2 2

#74. Move A east 2 units:
X X     A A
1 1 M Z 2 C
S 1 B Y 2 2

#75. Move Z north:
X X   Z A A
1 1 M   2 C
S 1 B Y 2 2

#76. Move M north:
X X M Z A A
1 1     2 C
S 1 B Y 2 2

#77. Move Y on a path of 2 segments ending west:
X X M Z A A
1 1 Y   2 C
S 1 B   2 2

#78. Move 2 west:
X X M Z A A
1 1 Y 2   C
S 1 B 2 2

#79. Move C south:
X X M Z A A
1 1 Y 2
S 1 B 2 2 C

#80. Move A south:
X X M Z
1 1 Y 2 A A
S 1 B 2 2 C

#81. Move Z east 2 units:
X X M     Z
1 1 Y 2 A A
S 1 B 2 2 C

#82. Move M east 2 units:
X X     M Z
1 1 Y 2 A A
S 1 B 2 2 C

#83. Move Y on a path of 2 segments ending east:
X X   Y M Z
1 1   2 A A
S 1 B 2 2 C

#84. Move B north 2 units:
X X B Y M Z
1 1   2 A A
S 1   2 2 C

#85. Move 2 west:
X X B Y M Z
1 1 2   A A
S 1 2 2   C

#86. Move A west:
X X B Y M Z
1 1 2 A A
S 1 2 2   C

#87. Move C west:
X X B Y M Z
1 1 2 A A
S 1 2 2 C

#88. Move Z south 2 units:
X X B Y M
1 1 2 A A
S 1 2 2 C Z

#89. Move M on a path of 2 segments ending south:
X X B Y
1 1 2 A A M
S 1 2 2 C Z

#90. Move Y east 2 units:
X X B     Y
1 1 2 A A M
S 1 2 2 C Z

#91. Move A north:
X X B A A Y
1 1 2     M
S 1 2 2 C Z

#92. Move C on a path of 2 segments ending west:
X X B A A Y
1 1 2 C   M
S 1 2 2   Z

#93. Move M west:
X X B A A Y
1 1 2 C M
S 1 2 2   Z

#94. Move Y south:
X X B A A
1 1 2 C M Y
S 1 2 2   Z

#95. Move A east:
X X B   A A
1 1 2 C M Y
S 1 2 2   Z

#96. Move C north:
X X B C A A
1 1 2   M Y
S 1 2 2   Z

#97. Move 2 east:
X X B C A A
1 1   2 M Y
S 1   2 2 Z

#98. Move B south 2 units:
X X   C A A
1 1   2 M Y
S 1 B 2 2 Z

#99. Move C on a path of 2 segments ending south:
X X     A A
1 1 C 2 M Y
S 1 B 2 2 Z

#100. Move A west 2 units:
X X A A
1 1 C 2 M Y
S 1 B 2 2 Z

#101. Move Y on a path of 2 segments ending west:
X X A A Y
1 1 C 2 M
S 1 B 2 2 Z

#102. Move Z north 2 units:
X X A A Y Z
1 1 C 2 M
S 1 B 2 2

#103. Move M east:
X X A A Y Z
1 1 C 2   M
S 1 B 2 2

#104. Move 2 east:
X X A A Y Z
1 1 C   2 M
S 1 B   2 2

#105. Move C on a path of 2 segments ending south:
X X A A Y Z
1 1     2 M
S 1 B C 2 2

#106. Move A south:
X X     Y Z
1 1 A A 2 M
S 1 B C 2 2

#107. Move Y west 2 units:
X X Y     Z
1 1 A A 2 M
S 1 B C 2 2

#108. Move Z west 2 units:
X X Y Z
1 1 A A 2 M
S 1 B C 2 2

#109. Move M north:
X X Y Z   M
1 1 A A 2
S 1 B C 2 2

#110. Move 2 north:
X X Y Z 2 M
1 1 A A 2 2
S 1 B C

#111. Move C east 2 units:
X X Y Z 2 M
1 1 A A 2 2
S 1 B     C

#112. Move B east 2 units:
X X Y Z 2 M
1 1 A A 2 2
S 1     B C

#113. Move A south:
X X Y Z 2 M
1 1     2 2
S 1 A A B C

```