Question 5
Seven locomotives numbered 1–7 are in three sheds as shown. “Nhà kho” means shed and “Bãi đậu” means parking. Left to right, shed 1 contains [5], shed 2 [2,7,1], and shed 3 [4,3,6]; parking is empty.

John may perform O(X): move the rightmost locomotive of shed X to parking; or I(X): move the leftmost locomotive of parking into shed X. Neither a shed nor parking may hold more than three locomotives. Which action sequence puts locomotives 1,2,3 into shed 1 in that order?

John may perform O(X): move the rightmost locomotive of shed X to parking; or I(X): move the leftmost locomotive of parking into shed X. Neither a shed nor parking may hold more than three locomotives. Which action sequence puts locomotives 1,2,3 into shed 1 in that order?