Latin cubes puzzle


Problem:

You have nine red, nine yellow, and nin blue \(1{\times}1{\times}1\) blocks. Can you build a \(3{\times}3{\times}3\) cube, such that exactly color occurs exactly once in each row, column, and file?


Solution:

Yes. Here's one solution:


Going further:

Can you generalize to building an nxnxn cube from \(n\) sets of \(n^2\) \(1{\times}1{\times}1\) cubes?

This problem goes much deeper, as seen here.