A cube has all its faces painted with different colours. It is cut into smaller cubes of equal sizes such that the side of the small cube is one-fourth the big cube. The number of small cubes with only one of the sides painted is:

(a) 32

(b) 24

(c) 16

(d) 8