Peter buys a lottery ticket on which he enters an $n$-digit number, none of the digits being $0$. On the draw date, the lottery administrators will reveal an $n\times n$ table, each cell containing one of the digits from $1$ to $9$. A ticket wins a prize if it does not match any row or column of this table, read in either direction. Peter wants to bribe the administrators to reveal the digits on some cells chosen by Peter, so that Peter can guarantee to have a winning ticket. What is the minimum number of digits Peter has to know?