Fill the grid with digits from the given range, so that each letter appears exactly once in every row and column. Clues outside the grid represent the first two letters that can be seen from the corresponding directions, without any order.