Question 52
Let $n$ be a positive integer and let $Q$ be an $n \times n \times n$ cube. A box is a subset of $Q$ of one of the forms $1 \times n \times n$, $n \times 1 \times n$ or $n \times n \times 1$. Each $1 \times 1 \times 1$ cell of $Q$ is coloured one of several colours. Consider the colour set of each box (each colour listed once). There are $3n$ such, split into three $n$-element collections, one for each of the three directions. It turns out that every colour set in any of the three collections appears in each of the other two collections. Under these conditions, determine, in terms of $n$, the maximum number of colours $Q$ may bear.