It may be helpful to first try the two dimensional equivalent, which served as the inspiration for this puzzle.