Consider nine clocks arranged in a 3x3 array thusly:
The goal is to find a minimal sequence of moves to return all the dials to 12 o\'clock. Nine different ways to turn the dials on the clocks are supplied via a table below; each way is called a move. Select for each move a number 1 through 9 which will cause the dials of the affected clocks (see next table) to be turned 90 degrees clockwise.
[But this might or might not be the `correct\' answer; see below.]
For each test case:
Three lines of three space-separated numbers; each number represents the start time of one clock, 3, 6, 9, or 12. The ordering of the numbers corresponds to the first example above.
9 9 12 6 6 6 6 3 6
4 5 8 9