Consider an m x n table containing single digits 0 to 9. So each cell contain the digits 0 to 9.
My goal is to make sure that all combinations from 000 to 999 can be found in the table in adjacent cells. A cell is adjacent to the cells around it (i.e. above, below, to the left, to the right...