CMIMC 2018 Combinatorics Problem 2

Compute the number of ways to rearrange nine white cubes and eighteen black cubes into a 3 \times 3 \times 3 cube such that each 1 \times 1 \times 3 row or column contains exactly one white cube. Note that rotations are considered distinct.