Solver for 15 puzzle.