Divide the grid into nine regions, each consisting of 9 orthogonally connected cells. Place a digit from 1-9 in every cell such that each digit appears exactly once in every row, column, and region. Region boundaries divide the line into segments. The digit in the Nth cell of a segment indicates the position of the digit N on that segment. Positions are counted starting from 1 at an end of the segment which much be determined. Different segments may count in different directions relative to the line.