Generating snake cubes of given length