Copyright (c) James A. Storer

Tedious

A harder version of Abe's Easy Puzzle.
This puzzle has a turntable in the lower right corner.
Two 1x1 pieces or a 1x2 piece can rotate 90 degrees:
. .       . X          . X      . .
X Y   ->  . Y    or    . Y  ->  X Y

Tedious - "Version 1"
This formulation assumes that a single rectilinear move may pass
through the turntable independent of its initial orientation.
For example, moving horizontally, then rotating to vertical via
the turntable, then moving vertically, is 1 rectilinear move,
independent of the turntable orientation before the move.
Turntable orientation at the start and end does not matter.

######################################################################
Rectilinear Solution
      Rectilinear steps: 302
      Straight-Line steps: 378
      Unit steps: 498
######################################################################

#0:
C C Q P
B B Q P
1 2 $  
S S    

#1. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
C C Q  
B B Q  
1 2 $  
S S P P

#2. Move Q east:
C C   Q
B B   Q
1 2 $  
S S P P

#3. Move B east:
C C   Q
  B B Q
1 2 $  
S S P P

#4. Move C east:
  C C Q
  B B Q
1 2 $  
S S P P

#5. Move 1 north 2 units:
1 C C Q
  B B Q
  2 $  
S S P P

#6. Move 2 on a path of 2 segments ending north:
1 C C Q
2 B B Q
    $  
S S P P

#7. Move S north:
1 C C Q
2 B B Q
S S $  
    P P

#8. Move P west 2 units:
1 C C Q
2 B B Q
S S $  
P P    

#9. Move Q south 2 units:
1 C C  
2 B B  
S S $ Q
P P   Q

#10. Move B east:
1 C C  
2   B B
S S $ Q
P P   Q

#11. Move 2 east:
1 C C  
  2 B B
S S $ Q
P P   Q

#12. Move 1 south:
  C C  
1 2 B B
S S $ Q
P P   Q

#13. Move C west:
C C    
1 2 B B
S S $ Q
P P   Q

#14. Move B north:
C C B B
1 2    
S S $ Q
P P   Q

#15. Move 2 east 2 units:
C C B B
1     2
S S $ Q
P P   Q

#16. Move 1 east 2 units:
C C B B
    1 2
S S $ Q
P P   Q

#17. Move C south:
    B B
C C 1 2
S S $ Q
P P   Q

#18. Move B west 2 units:
B B    
C C 1 2
S S $ Q
P P   Q

#19. Move 2 on a path of 2 segments ending west:
B B 2  
C C 1  
S S $ Q
P P   Q

#20. Move Q north 2 units:
B B 2 Q
C C 1 Q
S S $  
P P    

#21. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
B B 2 Q
C C 1 Q
S S $ P
      P

#22. Move S south:
B B 2 Q
C C 1 Q
    $ P
S S   P

#23. Move C south:
B B 2 Q
    1 Q
C C $ P
S S   P

#24. Move B south:
    2 Q
B B 1 Q
C C $ P
S S   P

#25. Move 2 west 2 units:
2     Q
B B 1 Q
C C $ P
S S   P

#26. Move 1 on a path of 2 segments ending west:
2 1   Q
B B   Q
C C $ P
S S   P

#27. Move Q west:
2 1 Q  
B B Q  
C C $ P
S S   P

#28. Move P north 2 units:
2 1 Q P
B B Q P
C C $  
S S    

#29. Move S on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 1 Q P
B B Q P
C C $ S
      S

#30. Move C south:
2 1 Q P
B B Q P
    $ S
C C   S

#31. Move B south:
2 1 Q P
    Q P
B B $ S
C C   S

#32. Move 1 on a path of 2 segments ending west:
2   Q P
1   Q P
B B $ S
C C   S

#33. Move Q west:
2 Q   P
1 Q   P
B B $ S
C C   S

#34. Move P west:
2 Q P  
1 Q P  
B B $ S
C C   S

#35. Move S north 2 units:
2 Q P S
1 Q P S
B B $  
C C    

#36. Move C on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 Q P S
1 Q P S
B B $ C
      C

#37. Move B south:
2 Q P S
1 Q P S
    $ C
B B   C

#38. Move 1 on a path of 2 segments ending east:
2 Q P S
  Q P S
  1 $ C
B B   C

#39. Move 2 south 2 units:
  Q P S
  Q P S
2 1 $ C
B B   C

#40. Move Q west:
Q   P S
Q   P S
2 1 $ C
B B   C

#41. Move P west:
Q P   S
Q P   S
2 1 $ C
B B   C

#42. Move S west:
Q P S  
Q P S  
2 1 $ C
B B   C

#43. Move C north 2 units:
Q P S C
Q P S C
2 1 $  
B B    

#44. Move B on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
Q P S C
Q P S C
2 1 $ B
      B

#45. Move 2 on a path of 2 segments ending east:
Q P S C
Q P S C
  1 $ B
  2   B

#46. Move Q south 2 units:
  P S C
  P S C
Q 1 $ B
Q 2   B

#47. Move P west:
P   S C
P   S C
Q 1 $ B
Q 2   B

#48. Move S west:
P S   C
P S   C
Q 1 $ B
Q 2   B

#49. Move C west:
P S C  
P S C  
Q 1 $ B
Q 2   B

#50. Move B north 2 units:
P S C B
P S C B
Q 1 $  
Q 2    

#51. Move 2 east 2 units:
P S C B
P S C B
Q 1 $  
Q     2

#52. Move 1 on a path of 2 segments ending east:
P S C B
P S C B
Q   $  
Q   1 2

#53. Move S south 2 units:
P   C B
P   C B
Q S $  
Q S 1 2

#54. Move P east:
  P C B
  P C B
Q S $  
Q S 1 2

#55. Move Q north 2 units:
Q P C B
Q P C B
  S $  
  S 1 2

#56. Move S west:
Q P C B
Q P C B
S   $  
S   1 2

#57. Move 1 on a path of 2 segments ending north:
Q P C B
Q P C B
S 1 $  
S     2

#58. Move 2 west 2 units:
Q P C B
Q P C B
S 1 $  
S 2    

#59. Move B on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
Q P C  
Q P C  
S 1 $  
S 2 B B

#60. Move C east:
Q P   C
Q P   C
S 1 $  
S 2 B B

#61. Move P east:
Q   P C
Q   P C
S 1 $  
S 2 B B

#62. Move Q east:
  Q P C
  Q P C
S 1 $  
S 2 B B

#63. Move S north 2 units:
S Q P C
S Q P C
  1 $  
  2 B B

#64. Move 2 on a path of 2 segments ending north:
S Q P C
S Q P C
2 1 $  
    B B

#65. Move B west 2 units:
S Q P C
S Q P C
2 1 $  
B B    

#66. Move C on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
S Q P  
S Q P  
2 1 $  
B B C C

#67. Move P east:
S Q   P
S Q   P
2 1 $  
B B C C

#68. Move Q east:
S   Q P
S   Q P
2 1 $  
B B C C

#69. Move S east:
  S Q P
  S Q P
2 1 $  
B B C C

#70. Move 2 north 2 units:
2 S Q P
  S Q P
  1 $  
B B C C

#71. Move 1 on a path of 2 segments ending north:
2 S Q P
1 S Q P
    $  
B B C C

#72. Move B north:
2 S Q P
1 S Q P
B B $  
    C C

#73. Move C west 2 units:
2 S Q P
1 S Q P
B B $  
C C    

#74. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 S Q  
1 S Q  
B B $  
C C P P

#75. Move Q east:
2 S   Q
1 S   Q
B B $  
C C P P

#76. Move S east:
2   S Q
1   S Q
B B $  
C C P P

#77. Move 1 on a path of 2 segments ending north:
2 1 S Q
    S Q
B B $  
C C P P

#78. Move B north:
2 1 S Q
B B S Q
    $  
C C P P

#79. Move C north:
2 1 S Q
B B S Q
C C $  
    P P

#80. Move P west 2 units:
2 1 S Q
B B S Q
C C $  
P P    

#81. Move Q on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 1 S  
B B S  
C C $  
P P Q Q

#82. Move S east:
2 1   S
B B   S
C C $  
P P Q Q

#83. Move 1 on a path of 2 segments ending south:
2     S
B B 1 S
C C $  
P P Q Q

#84. Move 2 east 2 units:
    2 S
B B 1 S
C C $  
P P Q Q

#85. Move B north:
B B 2 S
    1 S
C C $  
P P Q Q

#86. Move C north:
B B 2 S
C C 1 S
    $  
P P Q Q

#87. Move P north:
B B 2 S
C C 1 S
P P $  
    Q Q

#88. Move Q west 2 units:
B B 2 S
C C 1 S
P P $  
Q Q    

#89. Move S on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
B B 2  
C C 1  
P P $  
Q Q S S

#90. Move 2 on a path of 2 segments ending south:
B B    
C C 1 2
P P $  
Q Q S S

#91. Move B east 2 units:
    B B
C C 1 2
P P $  
Q Q S S

#92. Move C north:
C C B B
    1 2
P P $  
Q Q S S

#93. Move P north:
C C B B
P P 1 2
    $  
Q Q S S

#94. Move Q north:
C C B B
P P 1 2
Q Q $  
    S S

#95. Move S west 2 units:
C C B B
P P 1 2
Q Q $  
S S    

#96. Move 2 south 2 units:
C C B B
P P 1  
Q Q $  
S S   2

#97. Move 1 on a path of 2 segments ending south:
C C B B
P P    
Q Q $ 1
S S   2

#98. Move B south:
C C    
P P B B
Q Q $ 1
S S   2

#99. Move C east 2 units:
    C C
P P B B
Q Q $ 1
S S   2

#100. Move P north:
P P C C
    B B
Q Q $ 1
S S   2

#101. Move B west 2 units:
P P C C
B B    
Q Q $ 1
S S   2

#102. Move 1 on a path of 2 segments ending west:
P P C C
B B 1  
Q Q $  
S S   2

#103. Move 2 north 2 units:
P P C C
B B 1 2
Q Q $  
S S    

#104. Move S on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
P P C C
B B 1 2
Q Q $ S
      S

#105. Move Q south:
P P C C
B B 1 2
    $ S
Q Q   S

#106. Move B south:
P P C C
    1 2
B B $ S
Q Q   S

#107. Move P south:
    C C
P P 1 2
B B $ S
Q Q   S

#108. Move C west 2 units:
C C    
P P 1 2
B B $ S
Q Q   S

#109. Move 2 on a path of 2 segments ending west:
C C 2  
P P 1  
B B $ S
Q Q   S

#110. Move S north 2 units:
C C 2 S
P P 1 S
B B $  
Q Q    

#111. Move Q on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
C C 2 S
P P 1 S
B B $ Q
      Q

#112. Move B south:
C C 2 S
P P 1 S
    $ Q
B B   Q

#113. Move P south:
C C 2 S
    1 S
P P $ Q
B B   Q

#114. Move C south:
    2 S
C C 1 S
P P $ Q
B B   Q

#115. Move 2 west 2 units:
2     S
C C 1 S
P P $ Q
B B   Q

#116. Move 1 on a path of 2 segments ending west:
2 1   S
C C   S
P P $ Q
B B   Q

#117. Move S west:
2 1 S  
C C S  
P P $ Q
B B   Q

#118. Move Q north 2 units:
2 1 S Q
C C S Q
P P $  
B B    

#119. Move B on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 1 S Q
C C S Q
P P $ B
      B

#120. Move P south:
2 1 S Q
C C S Q
    $ B
P P   B

#121. Move C south:
2 1 S Q
    S Q
C C $ B
P P   B

#122. Move 1 on a path of 2 segments ending west:
2   S Q
1   S Q
C C $ B
P P   B

#123. Move S west:
2 S   Q
1 S   Q
C C $ B
P P   B

#124. Move Q west:
2 S Q  
1 S Q  
C C $ B
P P   B

#125. Move B north 2 units:
2 S Q B
1 S Q B
C C $  
P P    

#126. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 S Q B
1 S Q B
C C $ P
      P

#127. Move C south:
2 S Q B
1 S Q B
    $ P
C C   P

#128. Move 1 on a path of 2 segments ending east:
2 S Q B
  S Q B
  1 $ P
C C   P

#129. Move 2 south 2 units:
  S Q B
  S Q B
2 1 $ P
C C   P

#130. Move S west:
S   Q B
S   Q B
2 1 $ P
C C   P

#131. Move Q west:
S Q   B
S Q   B
2 1 $ P
C C   P

#132. Move B west:
S Q B  
S Q B  
2 1 $ P
C C   P

#133. Move P north 2 units:
S Q B P
S Q B P
2 1 $  
C C    

#134. Move C on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
S Q B P
S Q B P
2 1 $ C
      C

#135. Move 2 on a path of 2 segments ending east:
S Q B P
S Q B P
  1 $ C
  2   C

#136. Move S south 2 units:
  Q B P
  Q B P
S 1 $ C
S 2   C

#137. Move Q west:
Q   B P
Q   B P
S 1 $ C
S 2   C

#138. Move B west:
Q B   P
Q B   P
S 1 $ C
S 2   C

#139. Move P west:
Q B P  
Q B P  
S 1 $ C
S 2   C

#140. Move C north 2 units:
Q B P C
Q B P C
S 1 $  
S 2    

#141. Move 2 east 2 units:
Q B P C
Q B P C
S 1 $  
S     2

#142. Move 1 on a path of 2 segments ending east:
Q B P C
Q B P C
S   $  
S   1 2

#143. Move S east:
Q B P C
Q B P C
  S $  
  S 1 2

#144. Move Q south 2 units:
  B P C
  B P C
Q S $  
Q S 1 2

#145. Move B west:
B   P C
B   P C
Q S $  
Q S 1 2

#146. Move S north 2 units:
B S P C
B S P C
Q   $  
Q   1 2

#147. Move 1 on a path of 2 segments ending north:
B S P C
B S P C
Q 1 $  
Q     2

#148. Move 2 west 2 units:
B S P C
B S P C
Q 1 $  
Q 2    

#149. Move C on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
B S P  
B S P  
Q 1 $  
Q 2 C C

#150. Move P east:
B S   P
B S   P
Q 1 $  
Q 2 C C

#151. Move S east:
B   S P
B   S P
Q 1 $  
Q 2 C C

#152. Move B east:
  B S P
  B S P
Q 1 $  
Q 2 C C

#153. Move Q north 2 units:
Q B S P
Q B S P
  1 $  
  2 C C

#154. Move 2 on a path of 2 segments ending north:
Q B S P
Q B S P
2 1 $  
    C C

#155. Move C west 2 units:
Q B S P
Q B S P
2 1 $  
C C    

#156. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
Q B S  
Q B S  
2 1 $  
C C P P

#157. Move S east:
Q B   S
Q B   S
2 1 $  
C C P P

#158. Move B east:
Q   B S
Q   B S
2 1 $  
C C P P

#159. Move Q east:
  Q B S
  Q B S
2 1 $  
C C P P

#160. Move 2 north 2 units:
2 Q B S
  Q B S
  1 $  
C C P P

#161. Move 1 on a path of 2 segments ending north:
2 Q B S
1 Q B S
    $  
C C P P

#162. Move C north:
2 Q B S
1 Q B S
C C $  
    P P

#163. Move P west 2 units:
2 Q B S
1 Q B S
C C $  
P P    

#164. Move S on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 Q B  
1 Q B  
C C $  
P P S S

#165. Move B east:
2 Q   B
1 Q   B
C C $  
P P S S

#166. Move Q east:
2   Q B
1   Q B
C C $  
P P S S

#167. Move 1 on a path of 2 segments ending north:
2 1 Q B
    Q B
C C $  
P P S S

#168. Move C north:
2 1 Q B
C C Q B
    $  
P P S S

#169. Move P north:
2 1 Q B
C C Q B
P P $  
    S S

#170. Move S west 2 units:
2 1 Q B
C C Q B
P P $  
S S    

#171. Move B on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 1 Q  
C C Q  
P P $  
S S B B

#172. Move Q east:
2 1   Q
C C   Q
P P $  
S S B B

#173. Move 1 on a path of 2 segments ending south:
2     Q
C C 1 Q
P P $  
S S B B

#174. Move 2 east 2 units:
    2 Q
C C 1 Q
P P $  
S S B B

#175. Move C north:
C C 2 Q
    1 Q
P P $  
S S B B

#176. Move P north:
C C 2 Q
P P 1 Q
    $  
S S B B

#177. Move S north:
C C 2 Q
P P 1 Q
S S $  
    B B

#178. Move B west 2 units:
C C 2 Q
P P 1 Q
S S $  
B B    

#179. Move Q on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
C C 2  
P P 1  
S S $  
B B Q Q

#180. Move 2 on a path of 2 segments ending south:
C C    
P P 1 2
S S $  
B B Q Q

#181. Move C east 2 units:
    C C
P P 1 2
S S $  
B B Q Q

#182. Move P north:
P P C C
    1 2
S S $  
B B Q Q

#183. Move S north:
P P C C
S S 1 2
    $  
B B Q Q

#184. Move B north:
P P C C
S S 1 2
B B $  
    Q Q

#185. Move Q west 2 units:
P P C C
S S 1 2
B B $  
Q Q    

#186. Move 2 south 2 units:
P P C C
S S 1  
B B $  
Q Q   2

#187. Move 1 on a path of 2 segments ending south:
P P C C
S S    
B B $ 1
Q Q   2

#188. Move S east 2 units:
P P C C
    S S
B B $ 1
Q Q   2

#189. Move P south:
    C C
P P S S
B B $ 1
Q Q   2

#190. Move C west 2 units:
C C    
P P S S
B B $ 1
Q Q   2

#191. Move S north:
C C S S
P P    
B B $ 1
Q Q   2

#192. Move 1 on a path of 2 segments ending west:
C C S S
P P 1  
B B $  
Q Q   2

#193. Move 2 north 2 units:
C C S S
P P 1 2
B B $  
Q Q    

#194. Move Q on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
C C S S
P P 1 2
B B $ Q
      Q

#195. Move B south:
C C S S
P P 1 2
    $ Q
B B   Q

#196. Move P south:
C C S S
    1 2
P P $ Q
B B   Q

#197. Move C south:
    S S
C C 1 2
P P $ Q
B B   Q

#198. Move S west 2 units:
S S    
C C 1 2
P P $ Q
B B   Q

#199. Move 2 on a path of 2 segments ending west:
S S 2  
C C 1  
P P $ Q
B B   Q

#200. Move Q north 2 units:
S S 2 Q
C C 1 Q
P P $  
B B    

#201. Move B on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
S S 2 Q
C C 1 Q
P P $ B
      B

#202. Move P south:
S S 2 Q
C C 1 Q
    $ B
P P   B

#203. Move C south:
S S 2 Q
    1 Q
C C $ B
P P   B

#204. Move S south:
    2 Q
S S 1 Q
C C $ B
P P   B

#205. Move 2 west 2 units:
2     Q
S S 1 Q
C C $ B
P P   B

#206. Move 1 on a path of 2 segments ending west:
2 1   Q
S S   Q
C C $ B
P P   B

#207. Move Q west:
2 1 Q  
S S Q  
C C $ B
P P   B

#208. Move B north 2 units:
2 1 Q B
S S Q B
C C $  
P P    

#209. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 1 Q B
S S Q B
C C $ P
      P

#210. Move C south:
2 1 Q B
S S Q B
    $ P
C C   P

#211. Move S south:
2 1 Q B
    Q B
S S $ P
C C   P

#212. Move 1 on a path of 2 segments ending west:
2   Q B
1   Q B
S S $ P
C C   P

#213. Move Q west:
2 Q   B
1 Q   B
S S $ P
C C   P

#214. Move B west:
2 Q B  
1 Q B  
S S $ P
C C   P

#215. Move P north 2 units:
2 Q B P
1 Q B P
S S $  
C C    

#216. Move C on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 Q B P
1 Q B P
S S $ C
      C

#217. Move S south:
2 Q B P
1 Q B P
    $ C
S S   C

#218. Move 1 on a path of 2 segments ending east:
2 Q B P
  Q B P
  1 $ C
S S   C

#219. Move 2 south 2 units:
  Q B P
  Q B P
2 1 $ C
S S   C

#220. Move Q west:
Q   B P
Q   B P
2 1 $ C
S S   C

#221. Move B west:
Q B   P
Q B   P
2 1 $ C
S S   C

#222. Move P west:
Q B P  
Q B P  
2 1 $ C
S S   C

#223. Move C north 2 units:
Q B P C
Q B P C
2 1 $  
S S    

#224. Move S on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
Q B P C
Q B P C
2 1 $ S
      S

#225. Move 2 on a path of 2 segments ending east:
Q B P C
Q B P C
  1 $ S
  2   S

#226. Move Q south 2 units:
  B P C
  B P C
Q 1 $ S
Q 2   S

#227. Move B west:
B   P C
B   P C
Q 1 $ S
Q 2   S

#228. Move P west:
B P   C
B P   C
Q 1 $ S
Q 2   S

#229. Move C west:
B P C  
B P C  
Q 1 $ S
Q 2   S

#230. Move S north 2 units:
B P C S
B P C S
Q 1 $  
Q 2    

#231. Move 2 east 2 units:
B P C S
B P C S
Q 1 $  
Q     2

#232. Move 1 on a path of 2 segments ending east:
B P C S
B P C S
Q   $  
Q   1 2

#233. Move P south 2 units:
B   C S
B   C S
Q P $  
Q P 1 2

#234. Move B east:
  B C S
  B C S
Q P $  
Q P 1 2

#235. Move Q north 2 units:
Q B C S
Q B C S
  P $  
  P 1 2

#236. Move P west:
Q B C S
Q B C S
P   $  
P   1 2

#237. Move 1 on a path of 2 segments ending north:
Q B C S
Q B C S
P 1 $  
P     2

#238. Move 2 west 2 units:
Q B C S
Q B C S
P 1 $  
P 2    

#239. Move S on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
Q B C  
Q B C  
P 1 $  
P 2 S S

#240. Move C east:
Q B   C
Q B   C
P 1 $  
P 2 S S

#241. Move B east:
Q   B C
Q   B C
P 1 $  
P 2 S S

#242. Move Q east:
  Q B C
  Q B C
P 1 $  
P 2 S S

#243. Move P north 2 units:
P Q B C
P Q B C
  1 $  
  2 S S

#244. Move 2 on a path of 2 segments ending north:
P Q B C
P Q B C
2 1 $  
    S S

#245. Move S west 2 units:
P Q B C
P Q B C
2 1 $  
S S    

#246. Move C on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
P Q B  
P Q B  
2 1 $  
S S C C

#247. Move B east:
P Q   B
P Q   B
2 1 $  
S S C C

#248. Move Q east:
P   Q B
P   Q B
2 1 $  
S S C C

#249. Move P east:
  P Q B
  P Q B
2 1 $  
S S C C

#250. Move 2 north 2 units:
2 P Q B
  P Q B
  1 $  
S S C C

#251. Move 1 on a path of 2 segments ending north:
2 P Q B
1 P Q B
    $  
S S C C

#252. Move S north:
2 P Q B
1 P Q B
S S $  
    C C

#253. Move C west 2 units:
2 P Q B
1 P Q B
S S $  
C C    

#254. Move B on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 P Q  
1 P Q  
S S $  
C C B B

#255. Move Q east:
2 P   Q
1 P   Q
S S $  
C C B B

#256. Move P east:
2   P Q
1   P Q
S S $  
C C B B

#257. Move 1 on a path of 2 segments ending north:
2 1 P Q
    P Q
S S $  
C C B B

#258. Move S north:
2 1 P Q
S S P Q
    $  
C C B B

#259. Move C north:
2 1 P Q
S S P Q
C C $  
    B B

#260. Move B west 2 units:
2 1 P Q
S S P Q
C C $  
B B    

#261. Move Q on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
2 1 P  
S S P  
C C $  
B B Q Q

#262. Move P east:
2 1   P
S S   P
C C $  
B B Q Q

#263. Move 1 on a path of 2 segments ending south:
2     P
S S 1 P
C C $  
B B Q Q

#264. Move 2 east 2 units:
    2 P
S S 1 P
C C $  
B B Q Q

#265. Move S north:
S S 2 P
    1 P
C C $  
B B Q Q

#266. Move C north:
S S 2 P
C C 1 P
    $  
B B Q Q

#267. Move B north:
S S 2 P
C C 1 P
B B $  
    Q Q

#268. Move Q west 2 units:
S S 2 P
C C 1 P
B B $  
Q Q    

#269. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
S S 2  
C C 1  
B B $  
Q Q P P

#270. Move 2 on a path of 2 segments ending south:
S S    
C C 1 2
B B $  
Q Q P P

#271. Move S east 2 units:
    S S
C C 1 2
B B $  
Q Q P P

#272. Move C north:
C C S S
    1 2
B B $  
Q Q P P

#273. Move B north:
C C S S
B B 1 2
    $  
Q Q P P

#274. Move Q north:
C C S S
B B 1 2
Q Q $  
    P P

#275. Move P west 2 units:
C C S S
B B 1 2
Q Q $  
P P    

#276. Move 2 south 2 units:
C C S S
B B 1  
Q Q $  
P P   2

#277. Move 1 on a path of 2 segments ending south:
C C S S
B B    
Q Q $ 1
P P   2

#278. Move S south:
C C    
B B S S
Q Q $ 1
P P   2

#279. Move C east 2 units:
    C C
B B S S
Q Q $ 1
P P   2

#280. Move B north:
B B C C
    S S
Q Q $ 1
P P   2

#281. Move S west 2 units:
B B C C
S S    
Q Q $ 1
P P   2

#282. Move 1 on a path of 2 segments ending west:
B B C C
S S 1  
Q Q $  
P P   2

#283. Move 2 north 2 units:
B B C C
S S 1 2
Q Q $  
P P    

#284. Move P on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
B B C C
S S 1 2
Q Q $ P
      P

#285. Move Q south:
B B C C
S S 1 2
    $ P
Q Q   P

#286. Move S south:
B B C C
    1 2
S S $ P
Q Q   P

#287. Move 1 west 2 units:
B B C C
1     2
S S $ P
Q Q   P

#288. Move 2 west 2 units:
B B C C
1 2    
S S $ P
Q Q   P

#289. Move C south:
B B    
1 2 C C
S S $ P
Q Q   P

#290. Move B east:
  B B  
1 2 C C
S S $ P
Q Q   P

#291. Move 1 north:
1 B B  
  2 C C
S S $ P
Q Q   P

#292. Move 2 west:
1 B B  
2   C C
S S $ P
Q Q   P

#293. Move C west:
1 B B  
2 C C  
S S $ P
Q Q   P

#294. Move P north 2 units:
1 B B P
2 C C P
S S $  
Q Q    

#295. Move Q on a path of 2 segments ending in direction 4 on edge (4,3)  (3,4):
1 B B P
2 C C P
S S $ Q
      Q

#296. Move S south:
1 B B P
2 C C P
    $ Q
S S   Q

#297. Move 2 on a path of 2 segments ending east:
1 B B P
  C C P
  2 $ Q
S S   Q

#298. Move 1 south 2 units:
  B B P
  C C P
1 2 $ Q
S S   Q

#299. Move B west:
B B   P
  C C P
1 2 $ Q
S S   Q

#300. Move C west:
B B   P
C C   P
1 2 $ Q
S S   Q

#301. Move P west:
B B P  
C C P  
1 2 $ Q
S S   Q

#302. Move Q north 2 units:
B B P Q
C C P Q
1 2 $  
S S