You are probably familiar with the word game Boggle, where you need to construct words by concatenating letters from a grid. Here we will play a numerical version of the game. The rules are as follows:
- Create a 6x6 grid of digits. Each cell must contain a single digit from 0 to 9.
- Starting in one cell you collect digits as you move to neighboring cells (in all 8 directions). As the digits are collected they are concatenated left to right, to form a single number. Note that the starting digit is collected too and you can revisit cells.
- Numbers cannot start with a 0.
Your task is to create a 6x6 grid of digits, such that the smallest positive number that cannot be constructed is as large as possible.