7654 3210
0123 4567

Select positions and find the optimal path