Copyright © University of Cambridge. All rights reserved.

Imagine a $3 \times3 \times3$ cube, made up from 27 unit cubes, all of which are made from clear plastic that can be filled with ease.

The location of a unit cube is described according to the following positions with respect to the three axes or directions:

- left, middle, right;

- front, middle, back;

- top, middle, bottom.

A marble is placed in the unit cube at left-middle-bottom.

Another is placed at middle-middle-middle.

Where should the third marble be placed to make a winning line of three marbles?

How many winning lines go through middle-middle-middle?

How many different types of winning lines are there?

How many winning lines are there altogether?

How many winning lines of four are there altogether in a $4 \times 4 \times 4$ cube?

How many winning lines of $n$ are there altogether in an $n \times n \times n$ cube?

This problem will feature in Maths Trails - Visualising, one of the books in the Maths Trails series written by members of the NRICH Team and published by Cambridge University Press. Maths Trails - Visualising is due to be published later this year, but for more details about the other books in the series, please see our publications page .