For each test case, print the minimum number of moves required to reach the second configuration from the first one, modulo $998\,244\,353$.

It can be shown that any two configurations are reachable from each other in this variation of the puzzle.